projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update the optimized AVR8 example implementation.
[openwrt/svn-archive/archive.git]
/
utils
/
ucmb
/
microcontroller_examples
/
atmel_avr8_optimized
/
ucmb.h
diff --git
a/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h
b/utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h
index e1e5fe74c9213ec72ad59c204f145abd14a2a458..06853d5fa931d0472b377463306a0406f7845d62 100644
(file)
--- a/
utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h
+++ b/
utils/ucmb/microcontroller_examples/atmel_avr8_optimized/ucmb.h
@@
-7,6
+7,11
@@
/* Max length of the message payload. */
#define UCMB_MAX_MSG_LEN (128 * 64 / 8 + 16)
/* Max length of the message payload. */
#define UCMB_MAX_MSG_LEN (128 * 64 / 8 + 16)
+/* Error logs: If you want UCMB error log messages, define
+ * ucmb_errorlog(message_string_literal)
+ * somewhere. If you don't define it, UCMB will be compiled
+ * without error messages. */
+
/* ucmb_rx_message - Message receive callback.
* Define this elsewhere. It's called on successful retrieval
* of a new message.
/* ucmb_rx_message - Message receive callback.
* Define this elsewhere. It's called on successful retrieval
* of a new message.
@@
-14,10
+19,17
@@
* 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.
* 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.
+ * This function is called with interrupts enabled.
*/
extern uint16_t ucmb_rx_message(uint8_t *payload,
uint16_t payload_length);
*/
extern uint16_t ucmb_rx_message(uint8_t *payload,
uint16_t payload_length);
+/* ucmb_work - Frequently call this from the mainloop.
+ * Must not be called from interrupt context.
+ * Must not be called with interrupts disabled.
+ */
+void ucmb_work(void);
+
/* Initialize the UCMB subsystem. */
void ucmb_init(void);
/* Initialize the UCMB subsystem. */
void ucmb_init(void);