mikroBUS library is a single header library with utility macros for mapping pins on mikroBUS slot to target MCU.
To use this library
mikrobus.h header is usually included within
board.h header if board
has mikroBUS slots.
Click drivers use these macros to map click board pins to mikroBUS slot pinouts, but can also be used in a user's application.
The following example shows how to define a pin name variable and map it to CS pin on mikroBUS slot 1.
pin_name_t mb1_cs = MIKROBUS(MIKROBUS_1, MIKROBUS_CS);
If board definition
board.h doesn't have the corresponding mikroBUS slot,
compiler will report undefined symbol error.