sizes in int
This commit is contained in:
parent
11e56ac38c
commit
3d3d24942e
4
ipv6.h
4
ipv6.h
@ -38,10 +38,10 @@ namespace ipv6 {
|
||||
void setSrcAddress(IPv6Addr& address);
|
||||
void setDstAddress(IPv6Addr& address);
|
||||
void setNextHeader(uint8_t next_header);
|
||||
void setPayload(char* payload, uint8_t len);
|
||||
void setPayload(char* payload, int len);
|
||||
|
||||
char* serialize();
|
||||
void deserialize(const char*, uint8_t len);
|
||||
void deserialize(const char*, int len);
|
||||
|
||||
void doAction();
|
||||
};
|
||||
|
4
ipv6.ino
4
ipv6.ino
@ -64,7 +64,7 @@ char* IPv6Packet::serialize() { /* do we actually need these function? everythin
|
||||
return packet;
|
||||
}
|
||||
|
||||
void IPv6Packet::deserialize(const char* buffer, uint8_t len) {
|
||||
void IPv6Packet::deserialize(const char* buffer, int len) {
|
||||
memcpy(packet, buffer, len);
|
||||
}
|
||||
|
||||
@ -79,7 +79,7 @@ void IPv6Packet::setDstAddress(IPv6Addr& address) {
|
||||
memcpy(packet + 24, (void*)&address, 16);
|
||||
}
|
||||
|
||||
void IPv6Packet::setPayload(char* payload, uint8_t len) {
|
||||
void IPv6Packet::setPayload(char* payload, int len) {
|
||||
memset(packet, 0, LEN);
|
||||
|
||||
ipv6_packet_header* header = (ipv6_packet_header*)packet;
|
||||
|
4
slip.h
4
slip.h
@ -8,8 +8,8 @@ namespace slip {
|
||||
const char ESC_END = 0xdc;
|
||||
const char ESC_ESC = 0xdd;
|
||||
|
||||
void send(const char* buffer, uint8_t len);
|
||||
int recv(char* buffer, uint8_t len);
|
||||
void send(const char* buffer, int len);
|
||||
int recv(char* buffer, int len);
|
||||
|
||||
}
|
||||
|
||||
|
4
slip.ino
4
slip.ino
@ -1,6 +1,6 @@
|
||||
namespace slip {
|
||||
|
||||
void send(const char* buffer, uint8_t len) {
|
||||
void send(const char* buffer, int len) {
|
||||
// Serial.write(END); /* frame-out any possible noise on the line */
|
||||
|
||||
for (uint8_t i = 0; i < len; ++i) {
|
||||
@ -22,7 +22,7 @@ namespace slip {
|
||||
Serial.write(END);
|
||||
}
|
||||
|
||||
int recv(char* buffer, uint8_t len) {
|
||||
int recv(char* buffer, int len) {
|
||||
char r;
|
||||
uint8_t i = 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user