Skip to content

Instantly share code, notes, and snippets.

@gammy
Last active November 24, 2015 13:02
Show Gist options
  • Save gammy/187c0f8f2a780a06af85 to your computer and use it in GitHub Desktop.
Save gammy/187c0f8f2a780a06af85 to your computer and use it in GitHub Desktop.
gammy@hypatia:~/code/ipec/admain$ git blame ad_pcie.h | grep BY_PORT
62eb51b2 (Kristian Gunstone 2015-10-23 13:39:09 +0200 25) #define TEST_TRIP_BY_PORT(state, port) ((state & (1 << port)) >> port)
gammy@hypatia:~/code/ipec/admain$ git diff 62eb51b2 | grep BY_PORT
-#define TEST_TRIP_BY_PORT(state, port) ((state & (1 << port)) >> port)
- status = TEST_TRIP_BY_PORT(trip_state, test_port);
- status = TEST_TRIP_BY_PORT(trip_state, test_port);
* Also see the AD_TEST_TRIP_BY_PORT helper macro in ad.h.
-#define TEST_TRIP_BY_PORT(state, port) ((state & (1 << port)) >> port)
- status_a = TEST_TRIP_BY_PORT(trip_state, 0);
- status_b = TEST_TRIP_BY_PORT(trip_state, 1);
- status_a = TEST_TRIP_BY_PORT(trip_state, 0);
- status_b = TEST_TRIP_BY_PORT(trip_state, 1);
gammy@hypatia:~/code/ipec/admain$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment