Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
10d0c644
Commit
10d0c644
authored
Mar 01, 2016
by
Terry Ellison
Browse files
Merge pull request #1100 from pjsg/fix-crash
Add call to get_pin_map() in platform_init()
parents
41022c3b
dbaad1b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/platform/pin_map.c
View file @
10d0c644
...
@@ -9,7 +9,6 @@ uint8_t pin_func[GPIO_PIN_NUM];
...
@@ -9,7 +9,6 @@ uint8_t pin_func[GPIO_PIN_NUM];
#ifdef GPIO_INTERRUPT_ENABLE
#ifdef GPIO_INTERRUPT_ENABLE
uint8_t
pin_num_inv
[
GPIO_PIN_NUM_INV
];
uint8_t
pin_num_inv
[
GPIO_PIN_NUM_INV
];
uint8_t
pin_int_type
[
GPIO_PIN_NUM
];
uint8_t
pin_int_type
[
GPIO_PIN_NUM
];
uint8_t
pin_trigger
[
GPIO_PIN_NUM
];
#endif
#endif
typedef
struct
{
typedef
struct
{
...
@@ -52,7 +51,6 @@ void get_pin_map(void) {
...
@@ -52,7 +51,6 @@ void get_pin_map(void) {
#ifdef GPIO_INTERRUPT_ENABLE
#ifdef GPIO_INTERRUPT_ENABLE
pin_num_inv
[
pin_num
[
i
]]
=
i
;
pin_num_inv
[
pin_num
[
i
]]
=
i
;
pin_int_type
[
i
]
=
pin
[
i
].
intr_type
;
pin_int_type
[
i
]
=
pin
[
i
].
intr_type
;
pin_trigger
[
i
]
=
false
;
#endif
#endif
}
}
}
}
...
...
app/platform/platform.c
View file @
10d0c644
...
@@ -18,6 +18,9 @@ static void pwms_init();
...
@@ -18,6 +18,9 @@ static void pwms_init();
int
platform_init
()
int
platform_init
()
{
{
// Setup the various forward and reverse mappings for the pins
get_pin_map
();
// Setup PWMs
// Setup PWMs
pwms_init
();
pwms_init
();
...
@@ -182,10 +185,8 @@ static void ICACHE_RAM_ATTR platform_gpio_intr_dispatcher (void *dummy){
...
@@ -182,10 +185,8 @@ static void ICACHE_RAM_ATTR platform_gpio_intr_dispatcher (void *dummy){
void
platform_gpio_init
(
task_handle_t
gpio_task
)
void
platform_gpio_init
(
task_handle_t
gpio_task
)
{
{
int
i
;
gpio_task_handle
=
gpio_task
;
gpio_task_handle
=
gpio_task
;
get_pin_map
();
ETS_GPIO_INTR_ATTACH
(
platform_gpio_intr_dispatcher
,
NULL
);
ETS_GPIO_INTR_ATTACH
(
platform_gpio_intr_dispatcher
,
NULL
);
}
}
/*
/*
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment