Skip to content

Commit

Permalink
sync: from ccca00f2
Browse files Browse the repository at this point in the history
Fix driver compile issue
  • Loading branch information
wujiangang committed Jun 2, 2017
1 parent 90c641e commit cba173c
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 9 additions & 2 deletions driver_lib/driver/hw_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,14 @@ void hw_timer_set_func(void (* user_hw_timer_cb_set)(void))
user_hw_timer_cb = user_hw_timer_cb_set;
}

static void hw_timer_isr_cb(void)
static void hw_timer_isr_cb(void *arg)
{
if (user_hw_timer_cb != NULL) {
(*(user_hw_timer_cb))();
}
}

static void hw_timer_nmi_cb(void)
{
if (user_hw_timer_cb != NULL) {
(*(user_hw_timer_cb))();
Expand Down Expand Up @@ -112,7 +119,7 @@ void ICACHE_FLASH_ATTR hw_timer_init(FRC1_TIMER_SOURCE_TYPE source_type, u8 req)
}

if (source_type == NMI_SOURCE) {
ETS_FRC_TIMER1_NMI_INTR_ATTACH(hw_timer_isr_cb);
ETS_FRC_TIMER1_NMI_INTR_ATTACH(hw_timer_nmi_cb);
} else {
ETS_FRC_TIMER1_INTR_ATTACH(hw_timer_isr_cb, NULL);
}
Expand Down
5 changes: 3 additions & 2 deletions driver_lib/driver/key.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@

#include "driver/key.h"

LOCAL void key_intr_handler(struct keys_param *keys);
LOCAL void key_intr_handler(void *arg);

/******************************************************************************
* FunctionName : key_init_single
Expand Down Expand Up @@ -144,10 +144,11 @@ key_50ms_cb(struct single_key_param *single_key)
* Returns : none
*******************************************************************************/
LOCAL void
key_intr_handler(struct keys_param *keys)
key_intr_handler(void *arg)
{
uint8 i;
uint32 gpio_status = GPIO_REG_READ(GPIO_STATUS_ADDRESS);
struct keys_param *keys = (struct keys_param *)arg;

for (i = 0; i < keys->key_num; i++) {
if (gpio_status & BIT(keys->single_key[i]->gpio_id)) {
Expand Down
Binary file modified lib/libdriver.a
Binary file not shown.

0 comments on commit cba173c

Please sign in to comment.