Skip to content

Commit

Permalink
Merge pull request #325 from ucolesanti/fix_issue_324
Browse files Browse the repository at this point in the history
Fix issue #324.
  • Loading branch information
mmaroti committed Jan 17, 2015
2 parents 8a2e30a + 621a4d8 commit 7d3142a
Show file tree
Hide file tree
Showing 13 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions tos/chips/cc2420x/CC2420XDriverLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
*
* Author: Janos Sallai
*/


#ifndef __CC2420XDRIVERLAYER_H__
#define __CC2420XDRIVERLAYER_H__



typedef nx_struct cc2420x_header_t
{
Expand All @@ -37,8 +37,8 @@ typedef struct cc2420x_metadata_t
{
uint8_t power;
uint8_t rssi;
};
} cc2420x_metadata_t;
}__attribute__((packed));
} __attribute__((packed)) cc2420x_metadata_t;

enum cc2420X_timing_enums {
CC2420X_SYMBOL_TIME = 16, // 16us
Expand Down Expand Up @@ -233,5 +233,5 @@ enum cc2420X_ram_addr_enums {
CC2420X_RAM_SHORTADR = 0x16a,
};



#endif // __CC2420XDRIVERLAYER_H__
2 changes: 1 addition & 1 deletion tos/chips/cc2420x/CC2420XRadio.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@ typedef struct cc2420xpacket_metadata_t
timestamp_metadata_t timestamp;
flags_metadata_t flags;
cc2420x_metadata_t cc2420x;
} cc2420xpacket_metadata_t;
} __attribute__((packed)) cc2420xpacket_metadata_t;

#endif//__CC2420XRADIO_H__
4 changes: 2 additions & 2 deletions tos/chips/cc2520/CC2520DriverLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ typedef struct cc2520_metadata_t
uint8_t power;
uint8_t ack;
uint8_t rssi;
};
} cc2520_metadata_t;
}__attribute__((packed));
} __attribute__((packed)) cc2520_metadata_t;

enum cc2520_reg_access_enums {
CC2520_FREG_MASK = 0x3F, // highest address in FREG
Expand Down
2 changes: 1 addition & 1 deletion tos/chips/cc2520/CC2520Radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ typedef struct cc2520packet_metadata_t
timestamp_metadata_t timestamp;
flags_metadata_t flags;
cc2520_metadata_t cc2520;
} cc2520packet_metadata_t;
} __attribute__((packed)) cc2520packet_metadata_t;

enum cc2520_security_enums{
NO_SEC = 0,
Expand Down
4 changes: 2 additions & 2 deletions tos/chips/rf212/RF212DriverLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ typedef struct rf212_metadata_t
{
uint8_t power;
uint8_t rssi;
};
} rf212_metadata_t;
}__attribute__((packed));
} __attribute__((packed)) rf212_metadata_t;

enum rf212_registers_enum
{
Expand Down
2 changes: 1 addition & 1 deletion tos/chips/rf212/RF212Radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ typedef struct rf212packet_metadata_t
timestamp_metadata_t timestamp;
flags_metadata_t flags;
rf212_metadata_t rf212;
} rf212packet_metadata_t;
} __attribute__((packed)) rf212packet_metadata_t;

#endif//__RF212RADIO_H__
4 changes: 2 additions & 2 deletions tos/chips/rf230/RF230DriverLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ typedef struct rf230_metadata_t
{
uint8_t power;
uint8_t rssi;
};
} rf230_metadata_t;
}__attribute__((packed));
} __attribute__((packed)) rf230_metadata_t;

enum rf230_registers_enum
{
Expand Down
2 changes: 1 addition & 1 deletion tos/chips/rf230/RF230Radio.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,6 @@ typedef struct rf230packet_metadata_t
timestamp_metadata_t timestamp;
flags_metadata_t flags;
rf230_metadata_t rf230;
} rf230packet_metadata_t;
} __attribute__((packed)) rf230packet_metadata_t;

#endif//__RF230RADIO_H__
2 changes: 1 addition & 1 deletion tos/lib/fastserial/Serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,6 @@ typedef struct serial_metadata {
uint16_t space_for_crc;
uint8_t length;
nx_uint8_t protocol[3];
} serial_metadata_t;
} __attribute__((packed)) serial_metadata_t;

#endif
2 changes: 1 addition & 1 deletion tos/lib/rfxlink/layers/LowPowerListeningLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
typedef struct lpl_metadata_t
{
uint16_t sleepint;
} lpl_metadata_t;
} __attribute__((packed)) lpl_metadata_t;

#endif//__LOWPOWERLISTENINGLAYER_H__
2 changes: 1 addition & 1 deletion tos/lib/rfxlink/layers/MetadataFlagsLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ typedef struct flags_metadata_t
{
// TODO: make sure that we have no more than 8 flags
uint8_t flags;
} flags_metadata_t;
} __attribute__((packed)) flags_metadata_t;

#endif//__METADATAFLAGSLAYER_H__
2 changes: 1 addition & 1 deletion tos/lib/rfxlink/layers/PacketLinkLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ typedef struct link_metadata_t
{
uint16_t maxRetries;
uint16_t retryDelay;
} link_metadata_t;
} __attribute__((packed)) link_metadata_t;

#endif//__PACKETLINKLAYER_H__
2 changes: 1 addition & 1 deletion tos/lib/rfxlink/layers/TimeStampingLayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,6 @@
typedef struct timestamp_metadata_t
{
uint32_t timestamp;
} timestamp_metadata_t;
} __attribute__((packed)) timestamp_metadata_t;

#endif//__TIMESTAMPINGLAYER_H__

0 comments on commit 7d3142a

Please sign in to comment.