EasyManua.ls Logo

VORAGO PEB1 - CMSIS Compatible Drivers; Using Preprocessor Directives

VORAGO PEB1
37 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
VA41620/VA41630 Evaluation Board User’s Manual
V1.0
34
Figure 4 - Keil IDE project item management folder
The “common” group has files specific to the MCU. The “driversgroup has files for using the
peripheral modules of the VA416xx MCU. The “src” group has files unique for this project
including the main.c file. The “BSP/evk/src” has files associated with the EVK boards. The
“utils” group has Segger RTT support files and some redirect functions that allow peripherals
with multiple instances to use the same code.
6.2 CMSIS compatible driver
ARM has created the Cortex-M Software Interface Standard (CMSIS) to provide a basis for
structuring code such that it can be ported from one ARM based MCU to another. Details on
this standard can be found at: http://www.arm.com/products/processors/cortex-m/cortex-
microcontroller-software-interface-standard.php.
6.3 Preprocessor directives
For bigger projects, the use of preprocessor directives can allow different build options. The
below code snippet shows the “ifdef” preprocessor directive. If “GPIO_DRIVER” was defined,
the first portion of the snippet would be executed. If “GPIO_DRIVER” was not defined, the
“else” portion would be executed. FYI: The demonstration code does not utilize the
“GPIO_DRIVER”.