Getting Started Application.
Copyright (c) 2014-2018 Microchip Technology Inc. and its subsidiaries.
Macros | |
#define | STRING_EOL "\r" |
#define | STRING_HEADER |
#define | TC_COUNT_VALUE 55535 |
Functions | |
static void | configure_console (void) |
Configure UART console. More... | |
static void | configure_eic_callback (void) |
Configures and registers the External Interrupt callback function with the driver. More... | |
static void | configure_extint (void) |
Configures the External Interrupt Controller to detect changes in the board button state. More... | |
static void | configure_tc (void) |
Configures TC function with the driver. More... | |
static void | configure_tc_callbacks (void) |
Registers TC callback function with the driver. More... | |
static void | extint_callback (void) |
Callback function for the EXTINT driver, called when an external interrupt detection occurs. More... | |
int | main (void) |
getting-started Application entry point. More... | |
static void | tc_callback_to_counter (struct tc_module *const module_inst) |
TC Callback function. More... | |
static void | update_led_state (void) |
Variables | |
static struct usart_module | cdc_uart_module |
static struct tc_module | tc_instance |
#define STRING_EOL "\r" |
#define STRING_HEADER |
Referenced by main().
#define TC_COUNT_VALUE 55535 |
Referenced by configure_tc(), and tc_callback_to_counter().
|
static |
Configure UART console.
References usart_config::baudrate, cdc_uart_module, CONF_STDIO_BAUDRATE, CONF_STDIO_MUX_SETTING, CONF_STDIO_PINMUX_PAD0, CONF_STDIO_PINMUX_PAD1, CONF_STDIO_PINMUX_PAD2, CONF_STDIO_PINMUX_PAD3, CONF_STDIO_USART_MODULE, usart_config::mux_setting, usart_config::pinmux_pad0, usart_config::pinmux_pad1, usart_config::pinmux_pad2, usart_config::pinmux_pad3, usart_enable(), and usart_get_config_defaults().
|
static |
Configures and registers the External Interrupt callback function with the driver.
References extint_callback(), EXTINT_CALLBACK_TYPE_DETECT, extint_chan_enable_callback(), and extint_register_callback().
Referenced by main().
|
static |
Configures the External Interrupt Controller to detect changes in the board button state.
References extint_chan_conf::detection_criteria, extint_chan_get_config_defaults(), extint_chan_set_config(), EXTINT_DETECT_BOTH, extint_chan_conf::filter_input_signal, extint_chan_conf::gpio_pin, and extint_chan_conf::gpio_pin_mux.
Referenced by main().
|
static |
Configures TC function with the driver.
References tc_config::counter_16_bit, tc_config::counter_size, TC_COUNT_VALUE, TC_COUNTER_SIZE_16BIT, tc_enable(), tc_get_config_defaults(), tc_init(), tc_instance, and tc_16bit_config::value.
|
static |
Registers TC callback function with the driver.
References TC_CALLBACK_OVERFLOW, tc_callback_to_counter(), tc_enable_callback(), tc_instance, and tc_register_callback().
|
static |
Callback function for the EXTINT driver, called when an external interrupt detection occurs.
References update_led_state().
Referenced by configure_eic_callback().
int main | ( | void | ) |
getting-started Application entry point.
References configure_console(), configure_eic_callback(), configure_extint(), configure_tc(), configure_tc_callbacks(), delay_init(), delay_ms, delay_s, port_config::direction, i, port_get_config_defaults(), PORT_PIN_DIR_OUTPUT, port_pin_set_config(), port_pin_set_output_level(), port_pin_toggle_output_level(), STRING_HEADER, system_init(), and system_interrupt_enable_global().
|
static |
TC Callback function.
References count, printf, TC_COUNT_VALUE, and tc_set_count_value().
Referenced by configure_tc_callbacks().
|
static |
References port_pin_get_input_level(), and port_pin_set_output_level().
Referenced by extint_callback().
|
static |
|
static |