Skip to content

Instantly share code, notes, and snippets.

@MrTrick
Created March 5, 2014 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MrTrick/9361900 to your computer and use it in GitHub Desktop.
Save MrTrick/9361900 to your computer and use it in GitHub Desktop.
#include <stdio.h>
#define COUNT 3
struct {int from; int to;} PINS[] = {
{1,5},
{2,4},
{14,72}
};
int main() {
int i;
for(i=0;i<COUNT;i++)
printf("%4d => %d\n", PINS[i].from, PINS[i].to);
}
@jasonblewis
Copy link

nice!

@jasonblewis
Copy link

struct gpio {
    int bank;
    int height;
  };

  struct gpio Gpio[] = {
    {0,1},
    {0,2}
  };

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment