SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
The KEY driver handles button inputs. To include the KEY driver, define HAL_KEY=TRUE in the preprocessor definitions. TI designed the driver to function with the buttons on the key fob or SmartRF05 Board depending on whether CC2540_MINIDK is defined. You must modify parts of the driver such as the port and pin definitions in hal_key.c to use it with custom hardware. For an example using the KEY driver, see the SimpleBLEPeripheral project.