Git
Wiki
Site
projects
/
soft
/
lpc122x
/
core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0bf4230
)
Argh ! hidden, silent bug, as I always used port 0 for the pins. (Thank you cyprien...
author
Nathael Pajani
<nathael.pajani@ed3l.fr>
Mon, 28 Jul 2014 08:51:23 +0000
(10:51 +0200)
committer
Nathael Pajani
<nathael.pajani@ed3l.fr>
Tue, 8 Nov 2022 16:03:04 +0000
(17:03 +0100)
drivers/cc1101.c
patch
|
blob
|
history
diff --git
a/drivers/cc1101.c
b/drivers/cc1101.c
index
0550bbf
..
b0a228e
100644
(file)
--- a/
drivers/cc1101.c
+++ b/
drivers/cc1101.c
@@
-404,7
+404,12
@@
static uint8_t paTable[] = {0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00};
/* Configure pins, reset the CC1101, and put the CC1101 chip in idle state */
void cc1101_init(uint8_t ssp_num, struct pio* cs_pin, struct pio* miso_pin)
{
- struct lpc_gpio* gpio = LPC_GPIO_REGS(cc1101.cs_pin.port);;
+ struct lpc_gpio* gpio = NULL;
+
+ if ((cs_pin == NULL) || (miso_pin == NULL)) {
+ return;
+ }
+ gpio = LPC_GPIO_REGS(cs_pin->port);
cc1101.spi_num = ssp_num;
/* Copy CS pin info and configure pin as GPIO output */
Techno-Innov
42 impasse de la Combe du Bois
01150 Blyes - France
contact@techno-innov.fr
Design et hébergement du site :
Techno-Innov
Techno-Innov
- SARL Coopérative
539 169 417 RCS Bourg-en-Bresse
Ce site n'utilise pas de cookies, désolé pour les gourmands !