Contiki 3.x
Files | Functions | Variables

Defines related to the SmartRF06 Evaluation Board irrespective of the EM mounted on it. More...

Files

file  als-sensor.c
 Driver for the SmartRF06EB ALS when a CC13xx/CC26xxEM is mounted on it.
 
file  als-sensor.h
 Header file for the SmartRF06EB + CC13xx/CC26xxEM ALS Driver.
 
file  button-sensor.c
 Driver for the SmartRF06EB buttons when a CC13xx/CC26xxEM is mounted on it.
 
file  button-sensor.h
 Header file for the SmartRF06EB + CC13xx/CC26xxEM Button Driver.
 
file  leds-arch.c
 Driver for the SmartRF06EB LEDs when a CC13xx/CC26xx EM is mounted on it.
 
file  srf06-sensors.c
 Generic module controlling sensors on the SmartRF06EB when a CC26xx is mounted on the board.
 

Functions

static void button_press_handler (uint8_t ioid)
 Handler for SmartRF button presses.
 
static void config_buttons (int type, int c, uint32_t key)
 Configuration function for the button sensor for all buttons. More...
 
static int config_select (int type, int value)
 Configuration function for the select button. More...
 
static int config_left (int type, int value)
 Configuration function for the left button. More...
 
static int config_right (int type, int value)
 Configuration function for the right button. More...
 
static int config_up (int type, int value)
 Configuration function for the up button. More...
 
static int config_down (int type, int value)
 Configuration function for the down button. More...
 
static int status (int type, uint32_t key_io_id)
 Status function for all buttons. More...
 
static int status_select (int type)
 Status function for the select button. More...
 
static int status_left (int type)
 Status function for the left button. More...
 
static int status_right (int type)
 Status function for the right button. More...
 
static int status_up (int type)
 Status function for the up button. More...
 
static int status_down (int type)
 Status function for the down button. More...
 
void leds_arch_init (void)
 Leds implementation. More...
 

Variables

const struct sensors_sensor button_select_sensor
 Exports a global symbol to be used by the sensor API.
 
const struct sensors_sensor button_left_sensor
 Exports a global symbol to be used by the sensor API.
 
SENSORS & button_select_sensor
 Exports a global symbol to be used by the sensor API.
 

Detailed Description

Defines related to the SmartRF06 Evaluation Board irrespective of the EM mounted on it.

This file provides connectivity information on LEDs, Buttons, UART and other peripherals

Function Documentation

static void config_buttons ( int  type,
int  c,
uint32_t  key 
)
static

Configuration function for the button sensor for all buttons.

Parameters
typeThis function does nothing unless type == SENSORS_ACTIVE
c0: disable the button, non-zero: enable
keyOne of BOARD_KEY_LEFT, BOARD_KEY_RIGHT etc

Definition at line 192 of file button-sensor.c.

References button_press_handler(), and gpio_interrupt_register_handler().

Referenced by config_down(), config_left(), config_right(), config_select(), and config_up().

static int config_down ( int  type,
int  value 
)
static

Configuration function for the down button.

Parameters are passed onto config_buttons, which does the actual configuration Parameters are ignored. They have been included because the prototype is dictated by the core sensor api. The return value is also required by the API but otherwise ignored.

Parameters
typepassed to config_buttons as-is
valuepassed to config_buttons as-is
Returns
ignored

Definition at line 319 of file button-sensor.c.

References config_buttons().

static int config_left ( int  type,
int  value 
)
static

Configuration function for the left button.

Parameters are passed onto config_buttons, which does the actual configuration Parameters are ignored. They have been included because the prototype is dictated by the core sensor api. The return value is also required by the API but otherwise ignored.

Parameters
typepassed to config_buttons as-is
valuepassed to config_buttons as-is
Returns
ignored

Definition at line 253 of file button-sensor.c.

References config_buttons().

static int config_right ( int  type,
int  value 
)
static

Configuration function for the right button.

Parameters are passed onto config_buttons, which does the actual configuration Parameters are ignored. They have been included because the prototype is dictated by the core sensor api. The return value is also required by the API but otherwise ignored.

Parameters
typepassed to config_buttons as-is
valuepassed to config_buttons as-is
Returns
ignored

Definition at line 275 of file button-sensor.c.

References config_buttons().

static int config_select ( int  type,
int  value 
)
static

Configuration function for the select button.

Parameters are passed onto config_buttons, which does the actual configuration Parameters are ignored. They have been included because the prototype is dictated by the core sensor api. The return value is also required by the API but otherwise ignored.

Parameters
typepassed to config_buttons as-is
valuepassed to config_buttons as-is
Returns
ignored

Definition at line 231 of file button-sensor.c.

References config_buttons().

static int config_up ( int  type,
int  value 
)
static

Configuration function for the up button.

Parameters are passed onto config_buttons, which does the actual configuration Parameters are ignored. They have been included because the prototype is dictated by the core sensor api. The return value is also required by the API but otherwise ignored.

Parameters
typepassed to config_buttons as-is
valuepassed to config_buttons as-is
Returns
ignored

Definition at line 297 of file button-sensor.c.

References config_buttons().

void leds_arch_init ( void  )

Leds implementation.

Leds implementation.

The FRDM-KL25Z has a tri-colour LED: Red is connected to PTB18 Green is connected to PTB19 Blue is connected to PTD1

Definition at line 47 of file leds-arch.c.

static int status ( int  type,
uint32_t  key_io_id 
)
static

Status function for all buttons.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
key_io_idBOARD_IOID_KEY_LEFT, BOARD_IOID_KEY_RIGHT etc
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will only be called by status_left, status_right and the called will pass the correct key_io_id

Definition at line 396 of file button-sensor.c.

Referenced by status_down(), status_left(), status_right(), status_select(), and status_up().

static int status_down ( int  type)
static

Status function for the down button.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will call status. It will pass type verbatim and it will also pass the correct key_io_id

Definition at line 476 of file button-sensor.c.

References status().

static int status_left ( int  type)
static

Status function for the left button.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will call status. It will pass type verbatim and it will also pass the correct key_io_id

Definition at line 434 of file button-sensor.c.

References status().

static int status_right ( int  type)
static

Status function for the right button.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will call status. It will pass type verbatim and it will also pass the correct key_io_id

Definition at line 448 of file button-sensor.c.

References status().

static int status_select ( int  type)
static

Status function for the select button.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will call status. It will pass type verbatim and it will also pass the correct key_io_id

Definition at line 420 of file button-sensor.c.

References status().

static int status_up ( int  type)
static

Status function for the up button.

Parameters
typeSENSORS_ACTIVE or SENSORS_READY
Returns
1 if the button's port interrupt is enabled (edge detect)

This function will call status. It will pass type verbatim and it will also pass the correct key_io_id

Definition at line 462 of file button-sensor.c.

References status().