Naming Conventions for Files and Functions

File names for drivers should adhere to the following naming convention: <DRIVER_NAME>.{c,h}. The naming of each driver instance is <DRIVER_NAME>_n, where n is a sequence number, but this can be renamed by the user in the Atmel START GUI.

Examples:

Note that Init-drivers have file names equal to the peripheral name, e.g. spi.{c,h}.

All functions in a driver are prefixed with the driver name, e.g. the write function for USART_0 is per default called USART_0_write(). If the user renames a component, the user name is used as prefix. As an example, if the user renames USART_0 to MODEM, the write function of this peripheral will be called MODEM_write(). This same is done for I/O pins, if the user renames e.g. PB2 to USER_LED, the driver functions will be prefixed with USER_LED, e.g. USER_LED_set_pull_mode().