Skip to content

Instantly share code, notes, and snippets.

@MightyPork
Last active January 13, 2017 05:28
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MightyPork/068890116f9de0bfb074f2ff8d5772e2 to your computer and use it in GitHub Desktop.
Save MightyPork/068890116f9de0bfb074f2ff8d5772e2 to your computer and use it in GitHub Desktop.
mmm
#define GPIO_RGB 5
// this is used in a lot of places because I was lazy to type the long thing.
// may be it's not even needed anymore, idk
#define FLASH_FN ICACHE_FLASH_ATTR
void FLASH_FN ioInit() {
// GPIO5 - RGB output
PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO5_U, FUNC_GPIO5);
// Configure GPIO directions
gpio_output_set(0, 0, (1<<GPIO_RGB), 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment