ATmegaRFX RCB board header file.
This file contains definitions and services related to the features of the ATmega256RFR2 Xplained Pro board.
To use this board, define BOARD= ATMEGA256RFR2_XPLAINED_PRO.
Copyright (c) 2013-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | button_id_t uint32_t |
Typedefs | |
typedef enum acc_status_tag | acc_status_t |
typedef enum adc_channel_tag | adc_channel_t |
Enumerations | |
enum | acc_status_tag { ACC_OFF, ACC_ON } |
enum | adc_channel_tag { X_AXIS, Y_AXIS, Z_AXIS, ADC_REF } |
Functions | |
void | acc_disable (void) |
disable the Accelerometer More... | |
void | acc_init (void) |
Initialize the Accelerometer. More... | |
void | adc_init (void) |
Initialize ADC for Accelerometer. More... | |
uint16_t | adc_read (adc_channel_t channel) |
Read the ADC for Accelerometer. More... | |
button_id_t | button_scan (void) |
Button handling handles the button pressed events. More... | |
void | led_ctrl (led_id_t led_no, led_action_t led_setting) |
Control LED status. More... | |
void | pulse_latch (void) |
Pulse latch for connected external hardware. More... | |
void | read_acc (uint16_t *x, uint16_t *y, uint16_t *z, uint16_t *ref) |
Read the ACC-Sensor Values with low-pass filtering. More... | |
void | set_button_pins_for_normal_mode (void) |
Button pins setting for active/normal mode. More... | |
void | update_latch_status (void) |
Update the latch status. More... | |
#define button_id_t uint32_t |
typedef enum acc_status_tag acc_status_t |
typedef enum adc_channel_tag adc_channel_t |
enum acc_status_tag |
enum adc_channel_tag |
void acc_disable | ( | void | ) |
disable the Accelerometer
References acc_enable(), and ACC_OFF.
void acc_init | ( | void | ) |
Initialize the Accelerometer.
References acc_enable(), ACC_ON, ADC_ref_val, x_axis_val, y_axis_val, and z_axis_val.
Referenced by board_init().
void adc_init | ( | void | ) |
Initialize ADC for Accelerometer.
Referenced by board_init().
uint16_t adc_read | ( | adc_channel_t | channel | ) |
Read the ADC for Accelerometer.
channel | ADC channel to be read |
Referenced by read_acc().
button_id_t button_scan | ( | void | ) |
Button handling handles the button pressed events.
button_no |
References BUTTON_IRQ_PORT, BUTTON_IRQ_PORT_DIR, BUTTON_PIN_0, BUTTON_PIN_1, BUTTON_PIN_2, BUTTON_PIN_3, BUTTON_PIN_4, BUTTON_PIN_5, BUTTON_PIN_6, BUTTON_PIN_7, BUTTON_PIN_8, BUTTON_PORT1_IN, delay_ms, ioport_get_pin_level(), MAX_KEY_SCANS, nop, and NUM_OF_IDENTICAL_KEYS.
Referenced by app_task(), and main().
void led_ctrl | ( | led_id_t | led_no, |
led_action_t | led_setting | ||
) |
Control LED status.
[in] | led_no | LED ID |
[in] | led_setting | LED_ON, LED_OFF, LED_TOGGLE |
References latch_status, LED_OFF, LED_ON, LED_TOGGLE, and pulse_latch().
void pulse_latch | ( | void | ) |
Pulse latch for connected external hardware.
References LATCH_DATA, LATCH_DATA_DIR, LATCH_PULSE, and latch_status.
Referenced by acc_enable(), board_init(), and led_ctrl().
void read_acc | ( | uint16_t * | x, |
uint16_t * | y, | ||
uint16_t * | z, | ||
uint16_t * | ref | ||
) |
Read the ACC-Sensor Values with low-pass filtering.
x | X-axis value is read and stored in this parameter |
y | y-axis value is read and stored in this parameter |
z | z-axis value is read and stored in this parameter |
ref | ref value is read and stored in this parameter |
References adc_read(), ADC_REF, ADC_ref_val, X_AXIS, x_axis_val, Y_AXIS, y_axis_val, Z_AXIS, and z_axis_val.
Referenced by acc_read_cb(), and app_task().
void set_button_pins_for_normal_mode | ( | void | ) |
Button pins setting for active/normal mode.
References BUTTON_PORT1, BUTTON_PORT1_DIR, BUTTON_PORT2, and BUTTON_PORT2_DIR.
Referenced by board_init().
void update_latch_status | ( | void | ) |