Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2dd42d1fd | |||
| abd04ef0bf | |||
| 454ee8a565 | |||
| fd8812433a | |||
| 8c044743cd | |||
| 9605143013 | |||
| 5592a785c8 | |||
| b137bdc268 | |||
| 6b0a7802a0 | |||
| 7e214ca71d | |||
| afd9e18802 | |||
| b2b7017e94 | |||
| 1229352c64 |
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1 +1,4 @@
|
||||
desktop.ini
|
||||
.pio
|
||||
.vscode
|
||||
.DS_Store
|
||||
platformio.ini
|
||||
18
.gitmodules
vendored
Normal file
18
.gitmodules
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
[submodule "lib/zh_avr_free_rtos"]
|
||||
path = lib/zh_avr_free_rtos
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_free_rtos
|
||||
[submodule "lib/zh_avr_vector"]
|
||||
path = lib/zh_avr_vector
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_vector
|
||||
[submodule "lib/zh_avr_i2c"]
|
||||
path = lib/zh_avr_i2c
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_i2c
|
||||
[submodule "lib/zh_avr_common"]
|
||||
path = lib/zh_avr_common
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_common
|
||||
[submodule "lib/zh_avr_pcf8574"]
|
||||
path = lib/zh_avr_pcf8574
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_pcf8574
|
||||
[submodule "lib/zh_avr_160x_i2c"]
|
||||
path = lib/zh_avr_160x_i2c
|
||||
url = http://git.zh.com.ru/avr_libraries/zh_avr_160x_i2c
|
||||
@@ -1,3 +0,0 @@
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
|
||||
project(ate0002)
|
||||
@@ -1,2 +1,3 @@
|
||||
# ate0002.000.000
|
||||
|
||||
git clone --recurse-submodules -b dev http://git.zh.com.ru/aerotech/ate0002.000.000
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1
lib/zh_avr_160x_i2c
Submodule
1
lib/zh_avr_160x_i2c
Submodule
Submodule lib/zh_avr_160x_i2c added at d95823281b
1
lib/zh_avr_common
Submodule
1
lib/zh_avr_common
Submodule
Submodule lib/zh_avr_common added at 728b5c6d1d
1
lib/zh_avr_free_rtos
Submodule
1
lib/zh_avr_free_rtos
Submodule
Submodule lib/zh_avr_free_rtos added at a408615f7d
1
lib/zh_avr_i2c
Submodule
1
lib/zh_avr_i2c
Submodule
Submodule lib/zh_avr_i2c added at da2fd0d2a8
1
lib/zh_avr_pcf8574
Submodule
1
lib/zh_avr_pcf8574
Submodule
Submodule lib/zh_avr_pcf8574 added at 196398ac6f
1
lib/zh_avr_vector
Submodule
1
lib/zh_avr_vector
Submodule
Submodule lib/zh_avr_vector added at eddd461e96
@@ -1 +0,0 @@
|
||||
idf_component_register(SRCS "main.c" INCLUDE_DIRS "")
|
||||
@@ -1,4 +0,0 @@
|
||||
void app_main(void)
|
||||
{
|
||||
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
30
src/main.c
Normal file
30
src/main.c
Normal file
@@ -0,0 +1,30 @@
|
||||
#include "FreeRTOS.h"
|
||||
#include "task.h"
|
||||
#include "avr/io.h"
|
||||
#include "stdio.h"
|
||||
|
||||
// Set configTOTAL_HEAP_SIZE to 1792!!!
|
||||
|
||||
#define BAUD_RATE 9600
|
||||
#define BAUD_PRESCALE (F_CPU / 16 / BAUD_RATE - 1)
|
||||
|
||||
int usart(char byte, FILE *stream)
|
||||
{
|
||||
while ((UCSR0A & (1 << UDRE0)) == 0)
|
||||
{
|
||||
}
|
||||
UDR0 = byte;
|
||||
return 0;
|
||||
}
|
||||
FILE uart = FDEV_SETUP_STREAM(usart, NULL, _FDEV_SETUP_WRITE);
|
||||
|
||||
int main(void)
|
||||
{
|
||||
UBRR0H = (BAUD_PRESCALE >> 8);
|
||||
UBRR0L = BAUD_PRESCALE;
|
||||
UCSR0B = (1 << RXEN0) | (1 << TXEN0);
|
||||
UCSR0C = (1 << UCSZ01) | (1 << UCSZ00);
|
||||
stdout = &uart;
|
||||
vTaskStartScheduler();
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user