Skip to content

Instantly share code, notes, and snippets.

🥃
Really, ST. Really?

Niklas Hauser salkinium

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.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.