Skip to content

Instantly share code, notes, and snippets.

🥃
Really, ST. Really?

Niklas Hauser salkinium

Block or report user

Report or block salkinium

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@salkinium
salkinium / macros.cpp
Last active Aug 29, 2015
Concept for typesafe bit operations for register mappings
View macros.cpp
// this is part of a xpcc unittest:
// https://github.com/roboterclubaachen/xpcc/blob/develop/src/xpcc/architecture/peripheral/test/register_test.hpp#L20
// more operations can be seen here:
// https://github.com/roboterclubaachen/xpcc/blob/develop/src/xpcc/architecture/peripheral/test/register_test.cpp#L16
// complete macro definitions are available here:
// https://github.com/roboterclubaachen/xpcc/blob/develop/src/xpcc/architecture/peripheral/register.hpp#L55
// see the type-safe registers in action here:
// https://github.com/roboterclubaachen/xpcc/blob/develop/src/xpcc/driver/inertial/lis302.hpp#L61
You can’t perform that action at this time.