struct의 좋은 예(?)
이것 역시 리눅스 커널을 수정하다 struct의 좋은 예가 될 것 같아 옮겨봄. 역시 커널은 코딩스킬을 배울 수 있어 좋음. #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) struct at91_gpio_bank { unsigned short id; /* peripheral ID */ unsigned long offset; /* offset from system peripheral base */}; void at91_gpio_init(struct at91_gpio_bank *data, int nr_banks){ int i; for (i = 0; i id); printf("offset: %d\n", bank->..