AVR MEGARF MACSC Driver Example 2.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Functions | |
static void | example_cmp1_int_cb (void) |
Symbol Counter Compare 1 interrupt callback function. More... | |
static void | example_cmp2_int_cb (void) |
Symbol CounterCompare 2 interrupt callback function. More... | |
static void | example_cmp3_int_cb (void) |
Symbol Counter Compare 3 interrupt callback function. More... | |
int | main (void) |
Variables | |
static volatile bool | sleep |
|
static |
Symbol Counter Compare 1 interrupt callback function.
This function is called when a compare match has occured on channel 1 of symbol counter. Compare match occurs on end of sleep period
References CMP2_INT_CHK_PIN, COMPARE_MODE, ioport_set_value(), MACSC_CC2, macsc_enable_cmp_int(), macsc_use_cmp(), sleep, SLEEP_PERIOD, usart_putchar(), and USART_SERIAL_PORT.
Referenced by main().
|
static |
Symbol CounterCompare 2 interrupt callback function.
This function is called when a compare match has occured on channel 2 has occurred CMP2_INT_CHK_PIN is set to LOW. Compare match occurs on end of active period
References sleep, sleep_disable(), usart_putchar(), and USART_SERIAL_PORT.
Referenced by main().
|
static |
Symbol Counter Compare 3 interrupt callback function.
This function is called when a compare match has occured on channel 3 of symbol counter and toggles CMP3_INT_CHK_PIN. CMP2_INT_CHK_PIN is set HIGH. Compare match occurs at the end of every beacon interval.
References ACTIVE_PERIOD, CMP2_INT_CHK_PIN, CMP3_INT_CHK_PIN, COMPARE_MODE, ioport_set_value(), ioport_toggle_pin(), MACSC_CC1, macsc_enable_cmp_int(), macsc_enable_manual_bts(), macsc_use_cmp(), usart_putchar(), and USART_SERIAL_PORT.
Referenced by main().
int main | ( | void | ) |
References usart_rs232_options::baudrate, BEACON_INTERVAL, board_init(), CMP2_INT_CHK_PIN, CMP3_INT_CHK_PIN, COMPARE_MODE, cpu_irq_enable, example_cmp1_int_cb(), example_cmp2_int_cb(), example_cmp3_int_cb(), ioport_configure_pin(), IOPORT_DIR_OUTPUT, ioport_init(), IOPORT_INIT_LOW, MACSC_CC3, macsc_enable(), macsc_enable_cmp_int(), macsc_enable_manual_bts(), macsc_set_cmp1_int_cb(), macsc_set_cmp2_int_cb(), macsc_set_cmp3_int_cb(), macsc_sleep_clk_enable(), macsc_use_cmp(), macsc_write_clock_source(), sleep, sleep_enable(), sleep_enter, sleep_set_mode(), SLEEP_SMODE_PSAVE, SYS_CLK_SRC, sysclk_enable_peripheral_clock(), sysclk_init(), usart_init_rs232(), usart_putchar(), USART_SERIAL_BAUDRATE, USART_SERIAL_CHAR_LENGTH, USART_SERIAL_PARITY, USART_SERIAL_PORT, and USART_SERIAL_STOP_BIT.
|
static |
Referenced by example_cmp1_int_cb(), example_cmp2_int_cb(), and main().