1 #ifndef BOARD_REF_CARD_H 2 #define BOARD_REF_CARD_H 53 #include <gpiointerrupt.h> 67 #define NUMBER_OF_CONFIG_ADC_CHANNELS 2 91 #define IO_EXPANDER_INTn EVE_P19_PC6 92 #define IO_EXPANDER_INTn_PORT EVE_P19_PC6_PORT 101 #define ACCELEROMETER_INTn 5 102 #define BATTERY_CHARGE_STATUS_IN 6 103 #define ANALOG_4_20mA_ERROR_INn 7 104 #define LED_RED0_OUTn 8 105 #define LED_RED1_OUTn 9 106 #define LED_RED2_OUTn 10 107 #define LED_RED3_OUTn 11 108 #define LED_YELLOW_OUTn 12 109 #define LED_GREEN_OUTn 13 110 #define LCD_BACKLIGHT0_OUTn 14 111 #define LCD_BACKLIGHT1_OUT 15 115 #define DIGITAL_OUT0_OUT 0 116 #define DIGITAL_OUT1_OUT 1 117 #define DIGITAL_OUT2_OUT 2 118 #define DIGITAL_OUT3_OUT 3 119 #define DIGITAL_IO4 4 120 #define DIGITAL_IO5 5 121 #define ANALOG_4_20mA_ENABLE_OUT 7 122 #define POWER_5V_ENABLE_OUT 8 123 #define POWER_AUX_ENABLE_OUT 9 124 #define POWER_RS485_ENABLE_OUTn 10 125 #define POWER_USB_HOST_ENABLE_OUT 11 126 #define POWER_LED_RGB_OUTn 12 127 #define BATTERY_CHARGE_STATUS_RESISTOR_OUT 13 128 #define BATTERY_CHARGE_ENABLE_100mA_OUT 14 129 #define BATTERY_CHARGE_ENABLE_250mA_OUT 15 171 #define LED_ENABLED true 173 #if (LED_ENABLED == true) 174 #define LED_FLASHING_ENABLED false 175 #define LED_COUNTING_ENABLED true 177 #define COUNTING_ON_TIME MWORK_MSEC(100) 178 #define COUNTING_OFF_TIME MWORK_MSEC(400) 186 uint16_t Mask = (1UL << LED_RED0_OUTn) | (1UL << LED_RED1_OUTn)
187 | (1UL << LED_RED2_OUTn) | (1UL << LED_RED3_OUTn)
188 | (1UL << LED_YELLOW_OUTn) | (1UL << LED_GREEN_OUTn);
189 uint16_t PortData = (~(BitLedOn << LED_RED0_OUTn)) & Mask;
193 if (BitLedOn & LED_RGB_RED)
194 GPIO_PinOutClear(gpioPortE, EVE_P15_PE14);
196 GPIO_PinOutSet(gpioPortE, EVE_P15_PE14);
198 if (BitLedOn & LED_RGB_GREEN)
199 GPIO_PinOutClear(gpioPortE, EVE_P16_PE15);
201 GPIO_PinOutSet(gpioPortE, EVE_P16_PE15);
203 if (BitLedOn & LED_RGB_BLUE)
204 GPIO_PinOutClear(gpioPortA, EVE_P20_PA15);
206 GPIO_PinOutSet(gpioPortA, EVE_P20_PA15);
213 #define BEEPER_ENABLED true 215 #if (BEEPER_ENABLED == true) 216 #define BEEPER_CLICK_ENABLED true 217 #define BEEPER_CLICK_TIME MWORK_MSEC(50) // Click duration in ms 225 GPIO_PinModeSet(gpioPortE, EVE_P16_PE15, gpioModePushPull, GPIO_HIGH);
227 GPIO_PinModeSet(gpioPortE, EVE_P16_PE15, gpioModePushPull, GPIO_LOW);
234 #define KEY_ENABLED true 236 #if (KEY_ENABLED == true) 237 #define REPEAT_KEY_ENABLED true 238 #define REPEAT_KEY_STEP2_ENABLED true 239 #define COMBI_KEYS_ENABLED true 240 #define COMBI_KEY_RELEASE_ENABLED true 242 #define NUMBER_OF_KEYS 4 243 #define NUMBER_OF_REPEAT_KEYS 2 244 #define NUMBER_OF_COMBI_GROUPS 1 246 #define KEY_SIGNAL_RECEIVER &ApplicMain 247 #define SCAN_KEY_INTERVAL 20 // ms 248 #define KEY_PRELL_TIME 80 // ms 250 #if (REPEAT_KEY_ENABLED == true) 251 extern const bool RepeatKeyEnable[NUMBER_OF_KEYS];
252 extern const struct key_repeat_t ConfigKeyRepeat[NUMBER_OF_REPEAT_KEYS];
254 #if (COMBI_KEYS_ENABLED == true) 255 extern const struct key_combi_t ConfigKeyCombi[NUMBER_OF_COMBI_GROUPS];
266 KeyInput = (KeyInput ^ 0x0f) & 0x0f;
272 #endif //BOARD_REF_CARD_H
bool IoExpPortWrite(const struct io_expander_t *IoExpander, const uint8_t Port0, const uint8_t Port1)
Name: IoExpPortWrite Write to IO expander PORT0 and PORT1.
Header file for the EVE millisecond-scale work scheduling.
static __inline void BeepOn(bool On)
static __inline uint32_t ReadKeyInput(void)
const struct accel_config_t MMA8652FC
Driver for I2C-based IO expander type NXP PCAL9535A.
bool IoExpPortRead(const struct io_expander_t *IoExpander, uint8_t *Port0, uint8_t *Port1)
Name: IoExpPortRead Read IO expander PORT0 and PORT1.
Driver for ADC scheduling and integration.
const struct lcd_driver_t Pcf85162
void PortsBoardInit(void)
Name: PortsBoardInit Initializes ports available for the board.
static __inline void UpdateLeds(uint32_t BitLedOn)
The structure defines combi key parameters. Note that it is possible to define individual debounce ti...
The structure defines key repeat parameters.
Driver for I2C in nRF52 uC.
Interface for Key driver in key.c.
const struct temp_sensor_t STLM75
const struct pwm_t Timer0
const struct io_expander_t * IoExpanders[NUMBER_OF_IO_EXPANDERS]