ucmb: Add more documentation and example code for AVR8
git-svn-id: svn://svn.openwrt.org/openwrt/packages@14564 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
24
utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h
Normal file
24
utils/ucmb/microcontroller_examples/atmel_avr8/ucmb.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef UCMB_AVR8_H_
|
||||
#define UCMB_AVR8_H_
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
|
||||
/* Max length of the message payload. */
|
||||
#define UCMB_MAX_MSG_LEN 0x200
|
||||
|
||||
/* ucmb_rx_message - Message receive callback.
|
||||
* Define this elsewhere. It's called on successful retrieval
|
||||
* of a new message.
|
||||
* If a reply message has to be transferred after this one, put the
|
||||
* message payload into the "payload" buffer and return the number
|
||||
* of bytes to transmit. If no reply message is needed, return 0.
|
||||
* Note that the "payload" buffer always has a size of UCMB_MAX_MSG_LEN.
|
||||
*/
|
||||
extern uint16_t ucmb_rx_message(uint8_t *payload,
|
||||
uint16_t payload_length);
|
||||
|
||||
/* Initialize the UCMB subsystem. */
|
||||
void ucmb_init(void);
|
||||
|
||||
#endif /* UCMB_AVR8_H_ */
|
Reference in New Issue
Block a user