ElektorBus C-library
A C-library which "hides" the ElektorBus-protocols (ElektorMessageProtocol and ApplicationProtocol) and makes the actual bus-application-code running on a microcontroller-node hardware-independent. Furthermore, this ElektorBus-library is hardware-independent itself.
A C-library which "hides" the ElektorBus-protocols (ElektorMessageProtocol and ApplicationProtocol) and makes the actual bus-application-code running on a microcontroller-node hardware-independent. Furthermore, this ElektorBus-library is hardware-independent itself.
The ElektorBus-Library is now part of a bigger project, the Embedded Firmware Library EFL. See
To hide the ElektorBus-protocols from the application-developer, the lib offers functions like
void SetValue(unsigned char sender, unsigned char receiver, unsigned char channel, unsigned char mode, int setvalue);
void TransmitValue(unsigned char sender, unsigned char receiver, unsigned char channel, unsigned char mode, int currentvalue);
which actually add a Part (unit of information, here a number from -1023..1023) to a buffer of parts, which will be encoded to a bus-message and sent out with the command
void SendParts();
Additionally the lib defines some "callback-functions" like
void ProcessPart(...);
This function is called every time a part was received. The application programmer has to implement this function in his application code, which is located in the main-C-file.
I tried to use similar functions like in the Javascript-library JSBus, which is used on the master-side of the Bus-System (PC or Android-Device).
Discussion (0 comments)