initial commit
This commit is contained in:
24
hal/hal_keypad/atbm6441/hal_interface_keypad_atbm6441.c
Executable file
24
hal/hal_keypad/atbm6441/hal_interface_keypad_atbm6441.c
Executable file
@@ -0,0 +1,24 @@
|
||||
#include "hal_interface_keypad.h"
|
||||
#include "hlog.h"
|
||||
|
||||
#define TAG "TAG_KEYPAD"
|
||||
uint32_t hal_keypad_init(){
|
||||
uint32_t ret = 0;
|
||||
hlogi("%s ok", __func__);
|
||||
|
||||
kpacket *packet = kpacket_new(EVENT_HAL_DAYNIGHT, 10);
|
||||
if (packet){
|
||||
put_string(packet, "123456789");
|
||||
//hal_post(packet);
|
||||
}
|
||||
atomic_dec(packet);
|
||||
INIT_ERR:
|
||||
return ret;
|
||||
}
|
||||
|
||||
uint32_t hal_keypad_deinit(){
|
||||
hlogi("%s ok", __func__);
|
||||
return 0;
|
||||
}
|
||||
|
||||
DECLARE_INIT(PRI_AFTER_DRIVER, hal_keypad_init);
|
||||
7
hal/hal_keypad/config.mk
Executable file
7
hal/hal_keypad/config.mk
Executable file
@@ -0,0 +1,7 @@
|
||||
SRC += $(wildcard $(HAL_DIR)/hal_keypad/*.c)
|
||||
CFLAGS += -I$(HAL_DIR)/hal_keypad
|
||||
ifdef MOD_KEYPAD
|
||||
SRC += $(wildcard $(HAL_DIR)/hal_keypad/$(MOD_KEYPAD)/*.c)
|
||||
else
|
||||
$(warning warning you sure no audio?)
|
||||
endif
|
||||
8
hal/hal_keypad/hal_interface_keypad.c
Executable file
8
hal/hal_keypad/hal_interface_keypad.c
Executable file
@@ -0,0 +1,8 @@
|
||||
#include <stdlib.h>
|
||||
#include "hal_interface_keypad.h"
|
||||
#include "hlog.h"
|
||||
|
||||
|
||||
#define TAG "TAG_KEYPAD"
|
||||
|
||||
|
||||
19
hal/hal_keypad/hal_interface_keypad.h
Executable file
19
hal/hal_keypad/hal_interface_keypad.h
Executable file
@@ -0,0 +1,19 @@
|
||||
/******************************************************************************************/
|
||||
#ifndef __HAL_INTERFACE_KEYPAD_H__
|
||||
#define __HAL_INTERFACE_KEYPAD_H__
|
||||
|
||||
#include <stdint.h>
|
||||
#include "hal.h"
|
||||
|
||||
uint32_t hal_keypad_init();
|
||||
|
||||
uint32_t hal_keypad_deinit();
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif /* __cplusplus */
|
||||
|
||||
#endif /* __HAL_INTERFACE_KEYPAD_H__ */
|
||||
|
||||
Reference in New Issue
Block a user