File name | What is in the file | Example |
---|---|---|
main.c | Main application, initializing the selected peripherals by calling atmel_start_init( ). | See project initialization sequence |
atmel_start.c | Code for initializing the
MCU, drivers, and middleware in the project. The system_init( ) function initializes the MCU (oscillators, clocks, flash wait states, etc.) and peripherals, which have been selected. Middleware initialization functions are called. |
#include <atmel_start.h> void atmel_start_init(void) { system_init(); temperature_sensors_init(); } |
atmel_start.h | API for initializing the MCU, drivers, and middleware in the project. Function definitions of atmel_start_init( ). |
void atmel_start_init(void); |
atmel_start_pins.h | Pin MUX mappings as made by the user inside Atmel START. Defines of pin user labels are found in the file atmel_start_pins.h. These user labels match what is configured in the PINMUX CONFIGURATOR. |
#define PB23 GPIO(GPIO_PORTB, 23) #define DGI_SS GPIO(GPIO_PORTB, 31) |
driver_init.c | Code for
initializing drivers. Contains system_init() and all peripheral initialization
functions. For peripherals using asynchronous drivers (IRQ enabled), there are IRQ handler functions. For example: ADC_Handler( ) is the IRQ handler. If the HAL layer has callbacks this handler will call these callbacks. |
|
driver_init.h | API for initializing drivers. Function definitions of peripheral initialization functions, related variables, and header files. |
#include <hal_usart_sync.h> extern struct usart_sync_descriptor USART_0; void USART_0_PORT_init(void); void USART_0_CLOCK_init(void); void USART_0_init(void); |
middleware_main.c | Initialization of middleware libraries. |
void temperature_sensors_init(void) { } |
middleware_main.h | Function definition of middleware initialization functions, related variables, and header files. |
#include <at30tse75x.h> #include <at30tse75x_config.h> extern struct temperature_sensor *TEMPERATURE_SENSOR_0; void temperature_sensors_init(void); |