Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Remote Application related API's

Functions

void accelero_init (void)
 Initialization of acceleroShould be done before main. More...
 
void accelero_off (void)
 Disable the accelero. More...
 
void accelero_on (void)
 Enables the accelero. More...
 
void accelero_read (unsigned char address, unsigned char *addr_ptr)
 read the accelero More...
 
void accelero_write (unsigned char data, unsigned char address)
 read the accelero More...
 
static void app_task (void)
 Application task and state machine. More...
 
static void buzzer_control (void)
 Buzzer Control. More...
 
static void buzzer_init (void)
 Buzzer initialization. More...
 
static void extended_delay_ms (uint16_t delay_ms)
 Extended blocking delay. More...
 
static void indicate_fault_behavior (void)
 Indicating malfunction. More...
 
static void init_system (void)
 initialise host app, pins, watchdog, etc More...
 
 ISR (INT2_vect)
 Prox ISR. More...
 
 ISR (INT3_vect)
 Accelero ISR. More...
 
 ISR (TIMER0_COMPA_vect)
 timer 0 compare ISR More...
 
static void led0_off (void)
 led0 off More...
 
static void led0_on (void)
 led0 on More...
 
static void led0_toggle (void)
 led0 Toggle More...
 
static void led1_off (void)
 led1 off More...
 
static void led1_on (void)
 led1 on More...
 
static void led1_toggle (void)
 Led1 Toggle. More...
 
int main (void)
 Main function - Initialization of RF4CE and QTouch are done. More...
 
void prox_init (void)
 Initialization of ProxShould be done before main. More...
 
void prox_off (void)
 Disable the prox. More...
 
void prox_on (void)
 Enable the prox. More...
 
static void sleep_led_control (void)
 This function controls the LED in a definitive fashion before going to sleep. More...
 
static void start_awake_timer_cb (void *callback_parameter)
 The callback function for the awake timer after the sleep period is over. More...
 
static void start_warm_reset_cb (void *callback_parameter)
 The callback function for the warm-reset timeout. More...
 

Variables

uint32_t timer_int
 timer 0 compare ISR More...
 

void accelero_off ( void  )

Disable the accelero.

Referenced by app_task().

void accelero_on ( void  )

Enables the accelero.

Referenced by accelero_init().

void accelero_read ( unsigned char  address,
unsigned char *  addr_ptr 
)

read the accelero

Parameters
addressof read location
addressof variable to store the read data.

References FALSE, TWI_statusReg::lastTransOK, TRUE, twi_get_data_from_transceiver(), twi_start_transceiver_with_data(), and twi_transceiver_busy().

Referenced by accelero_init(), and app_task().

void accelero_write ( unsigned char  data,
unsigned char  address 
)

read the accelero

Parameters
dataYhe data to be written
addressof register to write the data

References FALSE, and twi_start_transceiver_with_data().

Referenced by accelero_init().

static void app_task ( void  )
static
static void buzzer_control ( void  )
static

Buzzer Control.

Delay is introduced to make it audible

Referenced by app_task(), and start_warm_reset_cb().

static void buzzer_init ( void  )
static

Buzzer initialization.

Referenced by BSP_InitQTouch().

static void extended_delay_ms ( uint16_t  delay_ms)
static

Extended blocking delay.

Parameters
delay_msDelay value in ms

References pal_timer_delay().

Referenced by indicate_fault_behavior(), and sleep_led_control().

static void indicate_fault_behavior ( void  )
static
static void init_system ( void  )
static

initialise host app, pins, watchdog, etc

Referenced by BSP_InitQTouch().

ISR ( INT2_vect  )

Prox ISR.

References prox_int_flag.

ISR ( INT3_vect  )

Accelero ISR.

References acclero_int_flag.

ISR ( TIMER0_COMPA_vect  )
static void led0_off ( void  )
inlinestatic

led0 off

Referenced by indicate_fault_behavior(), and sleep_led_control().

static void led0_on ( void  )
inlinestatic

led0 on

Referenced by indicate_fault_behavior(), and sleep_led_control().

static void led0_toggle ( void  )
inlinestatic

led0 Toggle

Referenced by Touch_measurement().

static void led1_off ( void  )
inlinestatic

led1 off

Referenced by indicate_fault_behavior(), and sleep_led_control().

static void led1_on ( void  )
inlinestatic

led1 on

Referenced by indicate_fault_behavior(), and sleep_led_control().

static void led1_toggle ( void  )
inlinestatic

Led1 Toggle.

Referenced by Touch_measurement().

int main ( void  )

Main function - Initialization of RF4CE and QTouch are done.

Main function.

Then app_task() and nwk_task() is called in a loop.

The SAM3X_EK, SAM3X Arduino board and SAM4C_EK use two bytes length internal address EEPROM.

TWI and QT600 interface initialization

References accelero_init(), app_task(), AVR477_WARM_RESET_WAIT_DURATION_IN_US, burst_len_config(), buzzer_init(), config_sensors(), FUNC_PTR, indicate_fault_behavior(), init_system(), init_timer_isr(), node_status, NULL, nwk_init(), NWK_SUCCESS, nwk_task(), pal_global_irq_enable(), pal_timer_start(), prox_init(), QDebug_Init(), qt_avr477_filter_cb(), qt_filter_callback, qt_init_sensing, qt_set_parameters(), RESET, start_warm_reset_cb(), T_LED_TIMER, and TIMEOUT_RELATIVE.

void prox_init ( void  )

Initialization of ProxShould be done before main.

References prox_off().

Referenced by main().

void prox_off ( void  )

Disable the prox.

Referenced by app_task(), and prox_init().

void prox_on ( void  )

Enable the prox.

Referenced by app_task().

static void sleep_led_control ( void  )
static

This function controls the LED in a definitive fashion before going to sleep.

References extended_delay_ms(), led0_off(), led0_on(), led1_off(), and led1_on().

Referenced by app_task().

static void start_awake_timer_cb ( void *  callback_parameter)
static

The callback function for the awake timer after the sleep period is over.

Parameters
callback_parameterCallback parameter (unused)

References UNUSED.

Referenced by app_task().

static void start_warm_reset_cb ( void *  callback_parameter)
static

The callback function for the warm-reset timeout.

Parameters
callback_parameterCallback parameter (unused)

References allow_to_sleep, buzzer_control(), EE_QDEBUG_OFFSET, INTERN_EEPROM, nlme_reset_request(), node_status, pal_ps_get(), qgSubsAllways, qgSubsChange, qgSubsOnce, UNUSED, and WARM_START.

Referenced by main().

uint32_t timer_int

timer 0 compare ISR

Referenced by ISR().