Visible to Intel only — GUID: nla1656033119458
Ixiasoft
Visible to Intel only — GUID: nla1656033119458
Ixiasoft
7.8.5.3.8. Setting Creation Example
#include "system.h" #ifdef MY_CUSTOM_DRIVER_SMALL int send_data( <args> ) { // Small implementation } #else int send_data( <args> ) { // fast implementation } #endif
-
When you set the setting to true or 1, the BSP defines MY_CUSTOM_DRIVER_SMALL in either system.h or the BSP toolchain.cmake file.
-
When you compile the BSP, your driver is compiled with the appropriate routine incorporated in the object file.
-
When you disable the setting, MY_CUSTOM_DRIVER_SMALL is not defined.
Add the MY_CUSTOM_DRIVER_SMALL setting to your driver as follows using the add_sw_setting Tcl command:
add_sw_setting boolean_define_only system_h_define small_driver MY_CUSTOM_DRIVER_SMALL false "Enable the small implementation of the driver for my_peripheral"
For more information about detailed usage and restrictions, refer to the Board Support Package Tcl Commands chapter.