test simple central
This commit is contained in:
+25
@@ -0,0 +1,25 @@
|
||||
|
||||
#ifndef MEM_BOARD_CENTRAL
|
||||
#define MEM_BOARD_CENTRAL
|
||||
|
||||
static PIN_State mem_pins_state;
|
||||
static PIN_Handle mem_pins_handle;
|
||||
|
||||
static PIN_Config mem_pin_configuration[] = { //
|
||||
Board_GLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
Board_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
PIN_TERMINATE
|
||||
};
|
||||
|
||||
#define mem_pin_open() \
|
||||
do { \
|
||||
mem_pins_handle = PIN_open(&mem_pins_state, mem_pin_configuration); \
|
||||
} while (0)
|
||||
|
||||
static void MemBoard_init(void){
|
||||
mem_pin_open();
|
||||
}
|
||||
|
||||
#define SetMemOutputPIN(PIN, value) PIN_setOutputValue(mem_pins_handle, PIN, value)
|
||||
|
||||
#endif
|
||||
@@ -357,6 +357,8 @@ static readRssi_t readRssi[MAX_NUM_BLE_CONNS];
|
||||
static void SimpleBLECentral_init(void);
|
||||
static void SimpleBLECentral_taskFxn(UArg a0, UArg a1);
|
||||
|
||||
static void MemBoard_init(void);
|
||||
|
||||
static void SimpleBLECentral_processGATTMsg(gattMsgEvent_t *pMsg);
|
||||
static void SimpleBLECentral_handleKeys(uint8_t shift, uint8_t keys);
|
||||
static void SimpleBLECentral_processStackMsg(ICall_Hdr *pMsg);
|
||||
@@ -552,6 +554,8 @@ static void SimpleBLECentral_init(void)
|
||||
Display_print0(dispHandle, ROW_ZERO, 0, "BLE Central");
|
||||
}
|
||||
|
||||
#include "mem_board_central.h"
|
||||
|
||||
/*********************************************************************
|
||||
* @fn SimpleBLECentral_taskFxn
|
||||
*
|
||||
@@ -565,6 +569,8 @@ static void SimpleBLECentral_taskFxn(UArg a0, UArg a1)
|
||||
{
|
||||
// Initialize application
|
||||
SimpleBLECentral_init();
|
||||
MemBoard_init();
|
||||
SetMemOutputPIN(Board_GLED, 1);
|
||||
|
||||
// Application main loop
|
||||
for (;;)
|
||||
|
||||
Reference in New Issue
Block a user