attempt to use central on 2650 ma
This commit is contained in:
+7
-25
@@ -20,35 +20,17 @@ keysPressedCB_t appKeyChangeHandler = NULL;
|
||||
// Board_RLED | PIN_GPIO_OUTPUT_EN | PIN_GPIO_LOW | PIN_PUSHPULL,
|
||||
// PIN_TERMINATE
|
||||
//};
|
||||
static void mem_pin_callback(PIN_Handle handle, PIN_Id pin);
|
||||
|
||||
#define mem_pin_open() \
|
||||
do { \
|
||||
mem_pins_handle = PIN_open(&mem_pins_state, BoardGpioInitTable); \
|
||||
PIN_registerIntCb(mem_pins_handle, GPIO_keyCallback); \
|
||||
PIN_setConfig(mem_pins_handle, PIN_BM_IRQ, PIN_MEM_INS | PIN_IRQ_NEGEDGE); \
|
||||
Util_constructClock(&gpioChangeClock, GPIO_keyChangeHandler, GPIO_DEBOUNCE_TIMEOUT, 0, false, 0); \
|
||||
#define mem_pin_open() \
|
||||
do { \
|
||||
mem_pins_handle = PIN_open(&mem_pins_state, BoardGpioInitTable); \
|
||||
PIN_registerIntCb(mem_pins_handle, mem_pin_callback); \
|
||||
PIN_setInterrupt(mem_pins_handle, PIN_MEM_RST | PIN_IRQ_NEGEDGE); \
|
||||
PIN_setInterrupt(mem_pins_handle, PIN_MEM_REQ | PIN_IRQ_NEGEDGE); \
|
||||
} while (0)
|
||||
|
||||
#define SetMemOutputPIN(PIN, value) PIN_setOutputValue(mem_pins_handle, PIN, value)
|
||||
|
||||
|
||||
static void GPIO_keyCallback(PIN_Handle hPin, PIN_Id pinId)
|
||||
{
|
||||
keysPressed = 0;
|
||||
|
||||
if ( PIN_getInputValue(PIN_MEM_INS) == 0 )
|
||||
{
|
||||
keysPressed |= KEY_UART_EN;
|
||||
}
|
||||
}
|
||||
|
||||
static void GPIO_keyChangeHandler(UArg a0)
|
||||
{
|
||||
if (appKeyChangeHandler != NULL)
|
||||
{
|
||||
// Notify the application
|
||||
(*appKeyChangeHandler)(keysPressed);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
+2
-2
@@ -6,11 +6,11 @@
|
||||
#define VERSION_DATE_MONTH 6
|
||||
#define VERSION_DATE_DAY 4
|
||||
#define VERSION_DATE_HOUR 17
|
||||
#define VERSION_DATE_MINUTE 38
|
||||
#define VERSION_DATE_MINUTE 46
|
||||
|
||||
// this is NOT the version hash !!
|
||||
// it's the last version hash
|
||||
#define VERSION_HASH 9c8606e1d44ac9bf3de74264703664005d8febbc
|
||||
#define VERSION_HASH 7607c94764f90eb236cdfb152a87d9f3adb99884
|
||||
#define VERSION_GIT_BRANCH simple_central_ma_pin
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user