Skip to content

Commit c2da07a

Browse files
committed
Add header file
1 parent bc1fe55 commit c2da07a

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

hal/transport/CAN/MyTransportCAN.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// G FEEE DDDD CCCC BBBB BBBB AAAA AAAA
1010

1111
#include <mcp_can.h>
12+
#include "MyTransportCAN.h"
1213
#define CAN0_INT 2 // TODO make configurable
1314
MCP_CAN CAN0(10); // TODO make configurable
1415
//since long messages can be sliced and arrive mixed with other messages assemble buffer is required

hal/transport/CAN/MyTransportCAN.h

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
void _initFilters();
2+
3+
bool transportInit(void);
4+
5+
void _cleanSlot(uint8_t slot);
6+
7+
uint8_t _findCanPacketSlot();
8+
9+
uint8_t _findCanPacketSlot(long unsigned int from,long unsigned int currentPart,long unsigned int messageId);
10+
11+
bool transportSend(const uint8_t to, const void* data, const uint8_t len, const bool noACK);
12+
13+
bool transportDataAvailable(void);
14+
15+
uint8_t transportReceive(void* data);
16+
17+
void transportSetAddress(const uint8_t address);
18+
19+
uint8_t transportGetAddress(void);
20+
21+
bool transportSanityCheck(void);
22+
23+
void transportPowerDown(void);
24+
25+
void transportPowerUp(void);
26+
27+
void transportSleep(void);
28+
29+
void transportStandBy(void);
30+
31+
int16_t transportGetSendingRSSI(void);
32+
33+
int16_t transportGetReceivingRSSI(void);
34+
35+
int16_t transportGetSendingSNR(void);
36+
37+
int16_t transportGetReceivingSNR(void);
38+
39+
int16_t transportGetTxPowerPercent(void);
40+
41+
int16_t transportGetTxPowerLevel(void);
42+
43+
bool transportSetTxPowerPercent(const uint8_t powerPercent);
44+

0 commit comments

Comments
 (0)