Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mprvar.h
Show First 20 Lines • Show All 758 Lines • ▼ Show 20 Lines | |||||
#define MPR_PRINTFIELD_START(sc, tag...) \ | #define MPR_PRINTFIELD_START(sc, tag...) \ | ||||
mpr_printf((sc), ##tag); \ | mpr_printf((sc), ##tag); \ | ||||
mpr_print_field((sc), ":\n") | mpr_print_field((sc), ":\n") | ||||
#define MPR_PRINTFIELD_END(sc, tag) \ | #define MPR_PRINTFIELD_END(sc, tag) \ | ||||
mpr_printf((sc), tag "\n") | mpr_printf((sc), tag "\n") | ||||
#define MPR_PRINTFIELD(sc, facts, attr, fmt) \ | #define MPR_PRINTFIELD(sc, facts, attr, fmt) \ | ||||
mpr_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) | mpr_print_field((sc), #attr ": " #fmt "\n", (facts)->attr) | ||||
#define MPR_PRINTFIELD_16(sc, facts, attr, fmt) \ | |||||
mpr_print_field((sc), #attr ": " #fmt "\n", le16toh((facts)->attr)) | |||||
#define MPR_PRINTFIELD_32(sc, facts, attr, fmt) \ | |||||
mpr_print_field((sc), #attr ": " #fmt "\n", le32toh((facts)->attr)) | |||||
static __inline void | static __inline void | ||||
mpr_from_u64(uint64_t data, U64 *mpr) | mpr_from_u64(uint64_t data, U64 *mpr) | ||||
{ | { | ||||
(mpr)->High = htole32((uint32_t)((data) >> 32)); | (mpr)->High = htole32((uint32_t)((data) >> 32)); | ||||
(mpr)->Low = htole32((uint32_t)((data) & 0xffffffff)); | (mpr)->Low = htole32((uint32_t)((data) & 0xffffffff)); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 195 Lines • Show Last 20 Lines |