User Manual Part 1

CY8CKIT-042-BLE Bluetooth® Low Energy (BLE) Pioneer Kit Guide, Doc. # 001-93731 Rev. *A 48
Example Projects
The project consists of 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 also contains function definition for initialization of the system and reading the
CapSense slider 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 events from the BLE stack to the
application layer for processing. It contains a method to send CapSense notifications to the client
device and process the Read and Write commands on the RGB LED characteristic by 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.
Additionally, the PRoC BLE version of this project consists of the RGB_PRSm.c/.h file, which con-
tains the function to drive the software-based PrISM method and drive the color and intensity on the
RGB LED.
This is the default firmware that comes in the BLE modules shipped with the kit.
Two projects demonstrate this functionality on two different devices:
PSoC_4_BLE_CapSense_Slider_LED works with the PSoC 4 BLE Module
PRoC_BLE_CapSense_Slider_LED works with the PRoC BLE Module.
The PSoC 4 BLE project implements RGB color and intensity control using the PRiSM component
whereas the PRoC BLE uses the software implementation of the PRiSM mode.