Aligned Board Button HAL naming
This commit is contained in:
parent
3031be39a8
commit
b605e9b43f
@ -43,11 +43,11 @@
|
||||
#include "ti-lib.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTON(key_left, "Key Left", BOARD_IOID_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_INPUT_PULLUP, BOARD_BUTTON_HAL_INDEX_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_INPUT_PULLUP, BUTTON_HAL_ID_KEY_LEFT, \
|
||||
true);
|
||||
|
||||
BUTTON_HAL_BUTTON(key_right, "Key Right", BOARD_IOID_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_INPUT_PULLUP, BOARD_BUTTON_HAL_INDEX_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_INPUT_PULLUP, BUTTON_HAL_ID_KEY_RIGHT, \
|
||||
true);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTONS(&key_left, &key_right);
|
||||
|
@ -198,8 +198,8 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -214,8 +214,8 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -199,8 +199,8 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -47,14 +47,14 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTON(reed_relay, "Reed Relay", BOARD_IOID_REED_RELAY, \
|
||||
GPIO_HAL_PIN_CFG_PULL_DOWN, \
|
||||
BOARD_BUTTON_HAL_INDEX_REED_RELAY, true);
|
||||
BUTTON_HAL_ID_REED_RELAY, true);
|
||||
|
||||
BUTTON_HAL_BUTTON(key_left, "Key Left", BOARD_IOID_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_LEFT, \
|
||||
true);
|
||||
|
||||
BUTTON_HAL_BUTTON(key_right, "Key Right", BOARD_IOID_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_RIGHT, \
|
||||
true);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTONS(&reed_relay, &key_left, &key_right);
|
||||
|
@ -248,9 +248,9 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BOARD_BUTTON_HAL_INDEX_REED_RELAY 0xFF
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_REED_RELAY 0xFF
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -229,9 +229,9 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BOARD_BUTTON_HAL_INDEX_REED_RELAY 0xFF
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_REED_RELAY 0xFF
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -43,20 +43,20 @@
|
||||
#include "ti-lib.h"
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTON(key_left, "Key Left", BOARD_IOID_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_LEFT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_LEFT, \
|
||||
true);
|
||||
BUTTON_HAL_BUTTON(key_right, "Key Right", BOARD_IOID_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_RIGHT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_RIGHT, \
|
||||
true);
|
||||
BUTTON_HAL_BUTTON(key_up, "Key Up", BOARD_IOID_KEY_UP, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_UP, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_UP, \
|
||||
true);
|
||||
BUTTON_HAL_BUTTON(key_down, "Key Down", BOARD_IOID_KEY_DOWN, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BOARD_BUTTON_HAL_INDEX_KEY_DOWN, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, BUTTON_HAL_ID_KEY_DOWN, \
|
||||
true);
|
||||
BUTTON_HAL_BUTTON(key_select, "Key Select", BOARD_IOID_KEY_SELECT, \
|
||||
GPIO_HAL_PIN_CFG_PULL_UP, \
|
||||
BOARD_BUTTON_HAL_INDEX_KEY_SELECT, true);
|
||||
BUTTON_HAL_ID_KEY_SELECT, true);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
BUTTON_HAL_BUTTONS(&key_left, &key_right, &key_up, &key_down, &key_select);
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
@ -238,11 +238,11 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_UP 0x02
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_DOWN 0x03
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_SELECT 0x04
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_KEY_UP 0x02
|
||||
#define BUTTON_HAL_ID_KEY_DOWN 0x03
|
||||
#define BUTTON_HAL_ID_KEY_SELECT 0x04
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -238,11 +238,11 @@
|
||||
* Those values are not meant to be modified by the user
|
||||
* @{
|
||||
*/
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_LEFT 0x00
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_RIGHT 0x01
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_UP 0x02
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_DOWN 0x03
|
||||
#define BOARD_BUTTON_HAL_INDEX_KEY_SELECT 0x04
|
||||
#define BUTTON_HAL_ID_KEY_LEFT 0x00
|
||||
#define BUTTON_HAL_ID_KEY_RIGHT 0x01
|
||||
#define BUTTON_HAL_ID_KEY_UP 0x02
|
||||
#define BUTTON_HAL_ID_KEY_DOWN 0x03
|
||||
#define BUTTON_HAL_ID_KEY_SELECT 0x04
|
||||
/** @} */
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/**
|
||||
|
@ -98,11 +98,11 @@
|
||||
#define CC26XX_DEMO_LEDS_BUTTON LEDS_RED
|
||||
#define CC26XX_DEMO_LEDS_REBOOT LEDS_ALL
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define CC26XX_DEMO_TRIGGER_1 BOARD_BUTTON_HAL_INDEX_KEY_LEFT
|
||||
#define CC26XX_DEMO_TRIGGER_2 BOARD_BUTTON_HAL_INDEX_KEY_RIGHT
|
||||
#define CC26XX_DEMO_TRIGGER_1 BUTTON_HAL_ID_KEY_LEFT
|
||||
#define CC26XX_DEMO_TRIGGER_2 BUTTON_HAL_ID_KEY_RIGHT
|
||||
|
||||
#if BOARD_SENSORTAG
|
||||
#define CC26XX_DEMO_TRIGGER_3 BOARD_BUTTON_HAL_INDEX_REED_RELAY
|
||||
#define CC26XX_DEMO_TRIGGER_3 BUTTON_HAL_ID_REED_RELAY
|
||||
#endif
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static struct etimer et;
|
||||
|
@ -98,18 +98,18 @@
|
||||
/*---------------------------------------------------------------------------*/
|
||||
/* User configuration */
|
||||
/* Take a sensor reading on button press */
|
||||
#define CC26XX_WEB_DEMO_SENSOR_READING_TRIGGER BOARD_BUTTON_HAL_INDEX_KEY_LEFT
|
||||
#define CC26XX_WEB_DEMO_SENSOR_READING_TRIGGER BUTTON_HAL_ID_KEY_LEFT
|
||||
|
||||
/* Payload length of ICMPv6 echo requests used to measure RSSI with def rt */
|
||||
#define CC26XX_WEB_DEMO_ECHO_REQ_PAYLOAD_LEN 20
|
||||
|
||||
#if BOARD_SENSORTAG
|
||||
/* Force an MQTT publish on sensor event */
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BOARD_BUTTON_HAL_INDEX_REED_RELAY
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BUTTON_HAL_ID_REED_RELAY
|
||||
#elif BOARD_LAUNCHPAD
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BOARD_BUTTON_HAL_INDEX_KEY_LEFT
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BUTTON_HAL_ID_KEY_LEFT
|
||||
#else
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BOARD_BUTTON_HAL_INDEX_KEY_DOWN
|
||||
#define CC26XX_WEB_DEMO_MQTT_PUBLISH_TRIGGER BUTTON_HAL_ID_KEY_DOWN
|
||||
#endif
|
||||
|
||||
#define CC26XX_WEB_DEMO_STATUS_LED LEDS_GREEN
|
||||
|
@ -63,7 +63,7 @@
|
||||
#define VERY_SLEEPY_MODE_OFF 0
|
||||
#define VERY_SLEEPY_MODE_ON 1
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define BUTTON_TRIGGER BOARD_BUTTON_HAL_INDEX_KEY_LEFT
|
||||
#define BUTTON_TRIGGER BUTTON_HAL_ID_KEY_LEFT
|
||||
/*---------------------------------------------------------------------------*/
|
||||
#define MAC_CAN_BE_TURNED_OFF 0
|
||||
#define MAC_MUST_STAY_ON 1
|
||||
|
Loading…
Reference in New Issue
Block a user