IoT Temperature Sensor Demo.
Copyright (c) 2016-2018 Microchip Technology Inc. and its subsidiaries.
#include "asf.h"
#include <string.h>
#include "stdio_serial.h"
#include "conf_uart_serial.h"
#include "demo.h"
Macros | |
#define | STRING_EOL "\r\n" |
#define | STRING_HEADER |
Functions | |
static void | configure_console (void) |
Configure UART console. More... | |
int | main (void) |
Main application function. More... | |
void | SysTick_Handler (void) |
SysTick handler used to measure precise delay. More... | |
Variables | |
static struct usart_module | cdc_uart_module |
UART module for debug. More... | |
volatile uint32_t | ms_ticks = 0 |
SysTick counter to avoid busy wait delay. More... | |
#define STRING_EOL "\r\n" |
#define STRING_HEADER |
Referenced by main().
|
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().
Referenced by main().
int main | ( | void | ) |
Main application function.
Start the sensor task then start the scheduler.
References board_init(), configure_console(), delay_init(), demo_start(), STRING_HEADER, system_cpu_clock_get_hz(), and system_init().
void SysTick_Handler | ( | void | ) |
SysTick handler used to measure precise delay.
References ms_ticks.
|
static |
UART module for debug.
Referenced by configure_console().
volatile uint32_t ms_ticks = 0 |
SysTick counter to avoid busy wait delay.
SysTick counter for non busy wait delay.
Referenced by button_press_duration(), demo_start(), and SysTick_Handler().