-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add blind spot #11
Open
parahybaja-punchClock
wants to merge
5
commits into
v5
Choose a base branch
from
develop-blind_spot
base: v5
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add blind spot #11
Changes from 1 commit
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
f694c0b
add blind spot
parahybaja-punchClock ad74cf3
Modify in process
parahybaja-punchClock 16bdb57
add project IDE
Flaviano-Junior 566c1f1
Insert project for accelerometer
Flaviano-Junior 51cef18
Delete project test_i2c
Flaviano-Junior File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
idf_component_register( | ||
SRCS "src/blind_spot.c" | ||
INCLUDE_DIRS "include" | ||
REQUIRES system driver | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version: "0.1.0" | ||
description: "task example" | ||
url: "https://github.com/Parahybaja/firmware" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* @file task_blind_spot.h | ||
* @author Flaviano Medeiros da Silva Júnior ([email protected]) | ||
* @brief task blind spot | ||
* @version 0.1 | ||
* @date 2024-01-22 | ||
* | ||
* @copyright Copyright (c) 2024 | ||
* | ||
* Version Modified By Date Comments | ||
* ------- ------------- ---------- ----------- | ||
* 0.1.0 Flaviano Jr. 22/01/2024 first version | ||
* | ||
*/ | ||
|
||
#pragma once | ||
|
||
#include "system.h" | ||
#include "driver/gpio.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
void task_blind_spot(void*); | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#include "task/blind_spot.h" | ||
|
||
static const char *TAG = "blind_spot"; | ||
|
||
void task_blind_spot(void *arg){ | ||
(void)arg; | ||
|
||
const gpio_num_t gpio_pin = (gpio_num_t)arg; | ||
|
||
// -----config gpio----- | ||
//zero-initialize the config structure. | ||
gpio_config_t io_conf = {}; | ||
//disable interrupt | ||
io_conf.intr_type = GPIO_INTR_DISABLE; | ||
//set as output mode | ||
io_conf.mode = GPIO_MODE_INPUT; | ||
//bit mask of the pins that you want to set | ||
io_conf.pin_bit_mask = (1ULL<<gpio_pin); | ||
//disable pull-down mode | ||
io_conf.pull_down_en = false; | ||
//disable pull-up mode | ||
io_conf.pull_up_en = false; | ||
//configure GPIO with the given settings | ||
ESP_ERROR_CHECK(gpio_config(&io_conf)); | ||
|
||
task_remaining_space(); | ||
|
||
for (;;) { | ||
// do something | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove unnecessary comments from task example |
||
ESP_LOGI(TAG, "CPU Blind Spot"); | ||
gpio_set_level(gpio_pin, true); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. add blind spot logic |
||
|
||
vTaskDelay(pdMS_TO_TICKS(1000)); | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update description