Skip to content

Instantly share code, notes, and snippets.

@Quarx2k
Created November 7, 2014 17:19
Show Gist options
  • Save Quarx2k/ab50a29c572c7468f22d to your computer and use it in GitHub Desktop.
Save Quarx2k/ab50a29c572c7468f22d to your computer and use it in GitHub Desktop.
#include <stdio.h>
#include <string.h>
/* 2.6.32 */
#define OMAP343X_PADCONF_OFF_WAKEUP_ENABLED (1 << 14)
#define OMAP343X_PADCONF_OFF_PULL_UP (1 << 13)
#define OMAP343X_PADCONF_OFF_PULL_DOWN (0 << 13)
#define OMAP343X_PADCONF_OFF_PUD_ENABLED (1 << 12)
#define OMAP343X_PADCONF_OFF_PUD_DISABLED (0 << 12)
#define OMAP343X_PADCONF_OFF_OUTPUT_HIGH (1 << 11)
#define OMAP343X_PADCONF_OFF_OUTPUT_LOW (0 << 11)
#define OMAP343X_PADCONF_OFF_OUTPUT_ENABLED (1 << 10)
#define OMAP343X_PADCONF_OFF_OUTPUT_DISABLED (0 << 10)
#define OMAP343X_PADCONF_OFFMODE_ENABLED (1 << 9)
#define OMAP343X_PADCONF_OFFMODE_DISABLED (0 << 9)
#define OMAP343X_PADCONF_INPUT_ENABLED (1 << 8)
#define OMAP343X_PADCONF_PULL_UP (1 << 4)
#define OMAP343X_PADCONF_PULL_DOWN (0 << 4)
#define OMAP343X_PADCONF_PUD_ENABLED (1 << 3)
#define OMAP343X_PADCONF_PUD_DISABLED (0 << 3)
#define OMAP343X_PADCONF_MUXMODE0 (0x00)
#define OMAP343X_PADCONF_MUXMODE1 (0x01)
#define OMAP343X_PADCONF_MUXMODE2 (0x02)
#define OMAP343X_PADCONF_MUXMODE3 (0x03)
#define OMAP343X_PADCONF_MUXMODE4 (0x04)
#define OMAP343X_PADCONF_MUXMODE5 (0x05)
#define OMAP343X_PADCONF_MUXMODE6 (0x06)
#define OMAP343X_PADCONF_MUXMODE7 (0x07)
int main (int argc, char *argv[]) {
printf("%x\n", MUX_MODE5 | INPUT_EN | PIN_OUTPUT_PULLDOWN | PULL_ENA);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment