You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
863 B
41 lines
863 B
5 years ago
|
/* Hello World Example
|
||
|
|
||
|
This example code is in the Public Domain (or CC0 licensed, at your option.)
|
||
|
|
||
|
Unless required by applicable law or agreed to in writing, this
|
||
|
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
|
||
|
CONDITIONS OF ANY KIND, either express or implied.
|
||
|
*/
|
||
|
#include <stdio.h>
|
||
|
#include "freertos/FreeRTOS.h"
|
||
|
#include "freertos/task.h"
|
||
|
#include "esp_system.h"
|
||
|
#include "esp_spi_flash.h"
|
||
|
#include "nokia.h"
|
||
|
#include "knob.h"
|
||
|
#include "gui.h"
|
||
|
|
||
|
|
||
|
void __attribute__((noreturn)) app_main()
|
||
|
{
|
||
|
printf("Hello world!\n");
|
||
|
|
||
|
gpio_config_t output = {
|
||
|
.pin_bit_mask = (1<<22),
|
||
|
.mode = GPIO_MODE_OUTPUT
|
||
|
};
|
||
|
gpio_config(&output);
|
||
|
|
||
|
|
||
|
gui_init();
|
||
|
|
||
|
knob_init();
|
||
|
|
||
|
bool level = 0;
|
||
|
while (1) {
|
||
|
vTaskDelay(pdMS_TO_TICKS(1000));
|
||
|
gpio_set_level(22, level);
|
||
|
level ^= 1;
|
||
|
}
|
||
|
}
|