Compare commits

13 Commits
main ... dev

Author SHA1 Message Date
f2dd42d1fd wip: 2025-08-18 07:39:31 +03:00
abd04ef0bf wip: 2025-08-18 07:39:12 +03:00
454ee8a565 wip: 2025-08-17 09:25:04 +03:00
fd8812433a wip: 2025-08-17 09:24:42 +03:00
8c044743cd wip: 2025-08-15 09:10:34 +03:00
9605143013 wip: 2025-08-12 18:18:21 +03:00
5592a785c8 wip: 2025-08-12 18:13:41 +03:00
b137bdc268 wip: 2025-08-12 18:11:11 +03:00
6b0a7802a0 wip: 2025-08-11 19:09:52 +03:00
7e214ca71d wip: 2025-08-11 18:27:17 +03:00
afd9e18802 wip: 2025-08-11 18:27:04 +03:00
b2b7017e94 wip: 2025-08-10 20:57:46 +03:00
1229352c64 wip: 2025-08-10 20:42:19 +03:00
10 changed files with 59 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@@ -0,0 +1,4 @@
.pio
.vscode
.DS_Store
platformio.ini

18
.gitmodules vendored Normal file
View 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

View File

@@ -1,2 +1,3 @@
# ate0002.000.000 # ate0002.000.000
git clone --recurse-submodules -b dev http://git.zh.com.ru/aerotech/ate0002.000.000

1
lib/zh_avr_160x_i2c Submodule

Submodule lib/zh_avr_160x_i2c added at d95823281b

1
lib/zh_avr_common Submodule

Submodule lib/zh_avr_common added at 728b5c6d1d

1
lib/zh_avr_free_rtos Submodule

Submodule lib/zh_avr_free_rtos added at a408615f7d

1
lib/zh_avr_i2c Submodule

Submodule lib/zh_avr_i2c added at da2fd0d2a8

1
lib/zh_avr_pcf8574 Submodule

Submodule lib/zh_avr_pcf8574 added at 196398ac6f

1
lib/zh_avr_vector Submodule

Submodule lib/zh_avr_vector added at eddd461e96

30
src/main.c Normal file
View 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;
}