kopia lustrzana https://github.com/Qyon/STM32_RTTY
commit
bf4172669f
|
@ -0,0 +1,26 @@
|
|||
Created by DF8OE
|
||||
----------------
|
||||
|
||||
|
||||
|
||||
view into port from outside
|
||||
|
||||
|
||||
______________________| |______________________
|
||||
| |
|
||||
| 1 2 3 4 5 |
|
||||
| |
|
||||
| 6 7 8 9 10 |
|
||||
|_______________________________________________________|
|
||||
|
||||
|
||||
1 - SWDIO (PA13)
|
||||
2 - RST
|
||||
3 - MCU switched 3.3V out to external device
|
||||
4 - I2C2_SCL (PB10)
|
||||
5 - GND
|
||||
6 - GND
|
||||
7 - SWCLK (PA14)
|
||||
8 - +U_Battery
|
||||
9 - +VDD_MCU
|
||||
10 - I2C2_SDA (PB11)
|
14
main.c
14
main.c
|
@ -67,10 +67,14 @@ void USART1_IRQHandler(void) {
|
|||
void TIM2_IRQHandler(void) {
|
||||
if (TIM_GetITStatus(TIM2, TIM_IT_Update) != RESET) {
|
||||
TIM_ClearITPendingBit(TIM2, TIM_IT_Update);
|
||||
|
||||
if (aprs_is_active()){
|
||||
aprs_timer_handler();
|
||||
} else {
|
||||
if (ALLOW_DISABLE_BY_BUTTON){
|
||||
if (ADCVal[1] > adc_bottom * 1.1){
|
||||
if (ADCVal[1] > adc_bottom){
|
||||
button_pressed++;
|
||||
if (button_pressed > (5 * RTTY_SPEED)){
|
||||
if (button_pressed > (RTTY_SPEED / 3)){
|
||||
disable_armed = 1;
|
||||
GPIO_SetBits(GPIOB, RED);
|
||||
GPIO_SetBits(GPIOB, GREEN);
|
||||
|
@ -82,13 +86,9 @@ void TIM2_IRQHandler(void) {
|
|||
button_pressed = 0;
|
||||
}
|
||||
if (button_pressed == 0) {
|
||||
adc_bottom = ADCVal[1]; // dynamical reference for power down level
|
||||
adc_bottom = ADCVal[1] * 1.1; // dynamical reference for power down level
|
||||
}
|
||||
}
|
||||
|
||||
if (aprs_is_active()){
|
||||
aprs_timer_handler();
|
||||
} else {
|
||||
if (tx_on) {
|
||||
send_rtty_status = send_rtty((char *) rtty_buf);
|
||||
if (!disable_armed){
|
||||
|
|
Ładowanie…
Reference in New Issue