ZestCode
 
Loading...
Searching...
No Matches
port.h
1
14
15#define SMART_PORT_BITS 16
16#define SMART_PORT_MASK ((1 << SMART_PORT_BITS) - 1)
17
22#define get_ports(ports, smart_port, adi_port) \
23 { \
24 uint32_t uport = (uint32_t)ports; \
25 smart_port = uport & SMART_PORT_MASK; \
26 adi_port = uport >> SMART_PORT_BITS; \
27 }
28
29static inline uint32_t merge_adi_ports(uint8_t smart_port, uint8_t adi_port) {
30 return (adi_port << SMART_PORT_BITS) | smart_port;
31}