-
Notifications
You must be signed in to change notification settings - Fork 14
Writing Firmware for a Simple Peripheral
We're going to be making a simple BLE profile for a not-so-theoretical alarm clock. First, let's do some thinking about what services our profile will provide. We'll definitely need to make the time available.
TI's example projects are densely documented, to the point that it can actually be hard to tell what's going on at a glance. This is especially true within IAR, which is a mediocre IDE. Let's start from the SimpleBLEPeripheral example project. The information presented here is condensed from the documentation that is included with the BLE stack in the documents directory.
OnBoard.c defines the capabilities of the evaluation hardware. If you specify that you're building your code to run on any of TI's first party dev-kits, you'll have access to a bunch of helpful functions already. Main.c is the entry point for the application and initializes the hardware and operating system abstraction layers. OSAL.c starts all of the processes needed to manage the BLE stack. Your application process will be initialized at the very bottom. SimpleProfile.c/.h defines the GATT configuration of a given profile. SimplePeripheral.c/.h contain lot of callbacks and such that actually define the way the peripheral will work. The init function should be your main starting place for writing any application specific code.
Okay, great! So what API do we use