Created
April 20, 2014 04:38
-
-
Save yamanetoshi/11105171 to your computer and use it in GitHub Desktop.
main function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* main.c - the entry point for the kernel */ | |
#include <stdint.h> | |
#include "rpi_lib/rpi.h" | |
#define UNUSED(x) (void)(x) | |
// kernel main function, it all begins here | |
void kernel_main(uint32_t r0, uint32_t r1, uint32_t atags) { | |
init_gpio(); | |
pinMode (22 ,ALT4); | |
pinMode (4 ,ALT5); | |
pinMode (27 ,ALT4); | |
pinMode (25 ,ALT4); | |
pinMode (24 ,ALT4); | |
// GPIO16 を H にセット | |
digitalWrite (16 , HIGH ); | |
// GPIO16 を L にセット | |
digitalWrite (16 , LOW ); | |
UNUSED(r0); | |
UNUSED(r1); | |
UNUSED(atags); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment