parent
2d6eeb83ea
commit
812c2fef21
8 changed files with 55 additions and 110 deletions
|
|
@ -12,9 +12,6 @@ const int gpio = 14;
|
|||
|
||||
/* This task uses the high level GPIO API (esp_gpio.h) to blink an LED.
|
||||
*
|
||||
* Even though it reads better than the register-level version in blinkenRegisterTask,
|
||||
* they compile to the exact same instructions (except gpio_enable also set the output type in
|
||||
* the GPIO control register).
|
||||
*/
|
||||
void blinkenTask(void *pvParameters)
|
||||
{
|
||||
|
|
@ -28,10 +25,12 @@ void blinkenTask(void *pvParameters)
|
|||
}
|
||||
|
||||
|
||||
/* This task uses all raw register operations to set the pins.
|
||||
/* This task demonstrates an alternative way to use raw register
|
||||
operations to blink an LED.
|
||||
|
||||
It's not fully parameterised, as the IOMUX_GPIO# macros involve a non-linear
|
||||
mapping from GPIO to IOMUX ports.
|
||||
The step that sets the iomux register can't be automatically
|
||||
updated from the 'gpio' constant variable, so you need to change
|
||||
the line that sets IOMUX_GPIO14 if you change 'gpio'.
|
||||
|
||||
There is no significant performance benefit to this way over the
|
||||
blinkenTask version, so it's probably better to use the blinkenTask
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue