mirror of
https://github.com/Zenithsiz/ist-semb-proj1.git
synced 2026-02-03 09:50:33 +00:00
Initial commit.
This commit is contained in:
commit
930b985abe
12
.clang-format
Normal file
12
.clang-format
Normal file
@ -0,0 +1,12 @@
|
||||
---
|
||||
BasedOnStyle: LLVM
|
||||
IndentWidth: 4
|
||||
TabWidth: 4
|
||||
UseTab: AlignWithSpaces
|
||||
AllowShortBlocksOnASingleLine: Empty
|
||||
AllowShortFunctionsOnASingleLine: Empty
|
||||
ColumnLimit: 120
|
||||
SpaceBeforeRangeBasedForLoopColon: false
|
||||
AllowShortCaseLabelsOnASingleLine: true
|
||||
IndentCaseBlocks: false
|
||||
ReflowComments: false
|
||||
6
.clangd
Normal file
6
.clangd
Normal file
@ -0,0 +1,6 @@
|
||||
CompileFlags:
|
||||
Add: -Wno-unknown-warning-option
|
||||
Remove: [-m*, -f*]
|
||||
|
||||
Diagnostics:
|
||||
UnusedIncludes: None
|
||||
7
.gitignore
vendored
Normal file
7
.gitignore
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
# ESP
|
||||
build/
|
||||
sdkconfig
|
||||
sdkconfig.old
|
||||
|
||||
# Clangd
|
||||
.cache
|
||||
7
.prettierrc
Normal file
7
.prettierrc
Normal file
@ -0,0 +1,7 @@
|
||||
{
|
||||
"trailingComma": "es5",
|
||||
"useTabs": true,
|
||||
"semi": true,
|
||||
"singleQuote": true,
|
||||
"singleAttributePerLine": true
|
||||
}
|
||||
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "ESP-IDF",
|
||||
"compilerPath": "${config:idf.toolsPath}/tools/xtensa-esp-elf/esp-13.2.0_20240530/xtensa-esp-elf/bin/xtensa-esp32-elf-gcc",
|
||||
"compileCommands": "${config:idf.buildPath}/compile_commands.json",
|
||||
"includePath": [
|
||||
"${config:idf.espIdfPath}/components/**",
|
||||
"${workspaceFolder}/**"
|
||||
],
|
||||
"browse": {
|
||||
"path": ["${config:idf.espIdfPath}/components", "${workspaceFolder}"],
|
||||
"limitSymbolsToIncludedHeaders": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
15
.vscode/launch.json
vendored
Normal file
15
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "gdbtarget",
|
||||
"request": "attach",
|
||||
"name": "Eclipse CDT GDB Adapter"
|
||||
},
|
||||
{
|
||||
"type": "espidf",
|
||||
"name": "Launch",
|
||||
"request": "launch"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
.vscode/settings.json
vendored
Normal file
4
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"C_Cpp.intelliSenseEngine": "default",
|
||||
"cSpell.words": ["IRAM"]
|
||||
}
|
||||
4
CMakeLists.txt
Normal file
4
CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(tpl2)
|
||||
4
main/CMakeLists.txt
Normal file
4
main/CMakeLists.txt
Normal file
@ -0,0 +1,4 @@
|
||||
idf_component_register(
|
||||
SRCS "main.c"
|
||||
INCLUDE_DIRS ""
|
||||
)
|
||||
44
main/main.c
Normal file
44
main/main.c
Normal file
@ -0,0 +1,44 @@
|
||||
#include "driver/gpio.h"
|
||||
#include "esp_system.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "spi_flash_mmap.h"
|
||||
#include <stdio.h>
|
||||
|
||||
void app_main(void) {
|
||||
// Initialize the pin
|
||||
const int pin = GPIO_NUM_2;
|
||||
gpio_reset_pin(pin);
|
||||
gpio_set_direction(pin, GPIO_MODE_OUTPUT);
|
||||
|
||||
/*
|
||||
bool status = 0;
|
||||
while (1) {
|
||||
// Set it and toggle it
|
||||
gpio_set_level(pin, status);
|
||||
status = !status;
|
||||
|
||||
// Then sleep
|
||||
const int ms = 500;
|
||||
const int ticks = ms / portTICK_PERIOD_MS;
|
||||
vTaskDelay(ticks);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
while (1) {
|
||||
const int ms_in = 200;
|
||||
const int ms_out = 2000;
|
||||
|
||||
// Set it and toggle it
|
||||
for (int i = 0; i < 3; i++) {
|
||||
gpio_set_level(pin, 1);
|
||||
vTaskDelay(ms_in / portTICK_PERIOD_MS);
|
||||
gpio_set_level(pin, 0);
|
||||
vTaskDelay(ms_in / portTICK_PERIOD_MS);
|
||||
}
|
||||
|
||||
vTaskDelay((ms_out - ms_in) / portTICK_PERIOD_MS);
|
||||
}
|
||||
*/
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user