1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

drivers/xbee: uncrustify

This commit is contained in:
Francisco Molina 2021-11-02 16:58:30 +01:00
parent 472f6495a8
commit 5579fd2220
2 changed files with 150 additions and 144 deletions

View File

@ -100,6 +100,7 @@ typedef struct {
static uint8_t _cksum(size_t offset, uint8_t *buf, size_t size)
{
uint8_t res = 0xff;
for (size_t i = offset; i < size; i++) {
res -= buf[i];
}
@ -426,6 +427,7 @@ static int _set_encryption(xbee_t *dev, const uint8_t *val)
{
uint8_t cmd[3];
resp_t resp;
/* get the current state of Encryption */
cmd[0] = 'E';
cmd[1] = 'E';
@ -448,6 +450,7 @@ static int _set_encryption_key(xbee_t *dev, const uint8_t *val, size_t len)
{
uint8_t cmd[18];
resp_t resp;
if (len != 16) { /* the AES key is 128bit, 16 byte */
return -EINVAL;
}
@ -519,6 +522,7 @@ int xbee_build_hdr(xbee_t *dev, uint8_t *xhdr, size_t payload_len,
/* finally configure the packet size and copy the actual dst address */
uint16_t size = (uint16_t)(payload_len + addr_len + 3);
xhdr[1] = (uint8_t)(size >> 8);
xhdr[2] = (uint8_t)(size & 0xff);
memcpy(&xhdr[5], dst_addr, addr_len);
@ -734,6 +738,7 @@ static void xbee_isr(netdev_t *netdev)
static int xbee_get(netdev_t *ndev, netopt_t opt, void *value, size_t max_len)
{
xbee_t *dev = (xbee_t *)ndev;
assert(dev);
switch (opt) {
@ -787,6 +792,7 @@ static int xbee_get(netdev_t *ndev, netopt_t opt, void *value, size_t max_len)
static int xbee_set(netdev_t *ndev, netopt_t opt, const void *value, size_t len)
{
xbee_t *dev = (xbee_t *)ndev;
assert(dev);
switch (opt) {