mirror of
https://github.com/demik/quack.git
synced 2025-01-31 22:29:57 +00:00
45 lines
1.2 KiB
C
45 lines
1.2 KiB
C
/* 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 "driver/gpio.h"
|
|
#include "sdkconfig.h"
|
|
#include "freertos/FreeRTOS.h"
|
|
#include "freertos/task.h"
|
|
#include "esp_log.h"
|
|
#include "esp_system.h"
|
|
#include "esp_spi_flash.h"
|
|
|
|
#include "blue.h"
|
|
#include "led.h"
|
|
#include "gpio.h"
|
|
|
|
static const char* TAG = "quack";
|
|
|
|
void app_main(void)
|
|
{
|
|
/* Print chip information */
|
|
esp_chip_info_t chip_info;
|
|
esp_chip_info(&chip_info);
|
|
ESP_LOGI(TAG, "This is %s chip with %d CPU cores, WiFi%s%s, "
|
|
"revision %d, %dMB %s flash",
|
|
CONFIG_IDF_TARGET,
|
|
chip_info.cores,
|
|
(chip_info.features & CHIP_FEATURE_BT) ? "/BT" : "",
|
|
(chip_info.features & CHIP_FEATURE_BLE) ? "/BLE" : "",
|
|
chip_info.revision,
|
|
spi_flash_get_chip_size() / (1024 * 1024),
|
|
(chip_info.features & CHIP_FEATURE_EMB_FLASH) ? "embedded" : "external");
|
|
|
|
ESP_LOGI(TAG, "Minimum free heap size: %d bytes", esp_get_minimum_free_heap_size());
|
|
|
|
gpio_init();
|
|
led_init();
|
|
blue_init();
|
|
}
|