SingingCat 0
application
ti1101.h
1#ifndef TI1101_H
2#define TI1101_H 1
3
4#include "networkif.h"
5
9void ti1101_set_debug(byte b);
10// send bytes
11// return 0 if ok
12int ti1101_transmit(struct network_context *nctx, const byte *data, uint16_t num_bytes);
13// once the ti1101_init is setup, it should
14// write received bytes to the buf, and call the callback thereafter.
15// it may write at most 'bufsize' characters to the buf.
16// initially, we might just do polling and thus receive one byte, call callback and receive another., later we might do DMA and this comes in handy.
17void ti1101_disable();
18int ti1101_off();
19void ti1101_on();
20void ti1101_print_status();
21void ti1101_print_config();
22void ti1101_disable_irq();
23void ti1101_enable_irq();
24
25void ti1101_receive_loop(); // call as often as you can...
26
27// should return 20 (0x14) currently
28int ti1101_read_version();
30void ti1101_forward_radio(long node);
31int received_radio_get_config(struct command *com);
32int received_radio_set_config(struct command *com);
33int ti1101_is_enabled();
34
35struct networkif *ti1101_get_netdev();
36#endif
int received_radio_set_config(struct command *com)
called when we received radio_set_config command modified the current radio config
Definition: ti1101.c:905
void ti1101_forward_radio(long node)
forward all radio packets to this node mostly useful to debug and decode and sniff 3rd party protocol...
Definition: ti1101.c:928
int received_radio_get_config(struct command *com)
called when we received radio_get_config command sends back an answer with the current radio config
Definition: ti1101.c:860
void ti1101_on()
enable processing of radio
Definition: ti1101.c:650
byte ti1101_get_last_irq_error()
if we throw an error in the irq we cannot print it directly. save it and return it here....
Definition: ti1101.c:695
int ti1101_off()
diable processing of ti1101 commands
Definition: ti1101.c:629
void ti1101_set_debug(byte b)
set debug mode of ti1101
Definition: ti1101.c:78