Hello,
I am working on a bluetooth communication between the STM32F407 Discovery board and a HC-05 bluetooth to serial module.
I would like to write the code to be reusable with other modules possibly (some kind of abstraction layer, not really a driver as the bluetooth stack is implemented in the module).
This HC-05 accepts AT commands (when it is in command mode), so the first thing I am doing is trying to implement the functions the module supports.
I was thinking about making macro functions available, so the usage would be straightforward and similar to the other modules in ChibiOS.
Can you give me any advices on how to begin?
I started experimenting and there is communication between the module and the board (I changed the name of the device), but I needed to use the serial driver in order to do this.
Maybe I should create a macro that takes a serial driver (e.g. SD2) as parameter to use as the bluetooth communications channel?
Thank you for your help.
Peter
bluetooth driver
- Giovanni
- Site Admin
- Posts: 14892
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 996 times
Re: bluetooth driver
The pattern in ChibiOS is to create a configuration structure to be passed to the module, you may follow this or simply pass the driver as first parameter.
Giovanni
Giovanni