User Manual Part 1

CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *A 63
Example Projects
The project consists the following files:
main.c/.h
These files contain the main function, which is the entry point and execution of the firmware appli-
cation. It contains function definition for initialization of the system and reading the CapSense
proximity data from the CapSense component.
BLEApplications.c/.h
These files contain all the macros and function definitions related to BLE communication and
operation. It contains the event callback function definition that is registered with the BLE compo-
nent startup and used by the component to send BLE-related event from the BLE stack to the
application layer for processing. It contains a method to send CapSense notifications to the client
device. It updates the BLE Connection parameter, which is important for low-power mode usage.
HandleLowPower.c/.h
These files contain the function to handle low-power mode. This function is continuously called in
the main loop and is responsible for pushing the BLE hardware block (BLESS) as well as the
CPU to Deep Sleep mode as much as possible. The wakeup source is either the BLE hardware
block Link Layer internal timer or the interrupt from the user button press (
SW2). This allows for
very low-power mode implementation and operation using a coin cell.
The red LED is used as the status LED and provides visual confirmation on advertising or
connection states. A blinking red LED indicates advertising state.
Two projects demonstrate this functionality on two different devices:
PSoC_4_BLE_CapSense_Proximity works with the PSoC 4 BLE Module.
PRoC_BLE_CapSense_Proximity works with the PRoC BLE Module.
Figure 4-33. Top Design for PSoC_4_BLE_CapSense_Proximity Project