![]() |
BJ-Keyer
1.03
Morsekeyer für 2 TRX und 6 Morsetasten
|
Globale Variablen, Definitionen und Prototypen. Mehr ...
#include <stdlib.h>#include <stdio.h>#include <stdint.h>#include <string.h>#include <math.h>#include <inttypes.h>#include <avr/io.h>#include <avr/pgmspace.h>#include <avr/wdt.h>#include <avr/interrupt.h>#include <avr/eeprom.h>#include <util/delay.h>#include <util/atomic.h>#include "oled/i2c.h"#include "oled/lcd.h"#include "oled/font.h"

gehe zum Quellcode dieser Datei
Datenstrukturen | |
| struct | State |
| struct | MenuCtrl |
| struct | Config |
| struct | Message |
Makrodefinitionen | |
| #define | F_CPU 16000000UL |
| #define | PRESCALER 8 |
| #define | SINEWAVELENGTH 64 |
| #define | F_CPUPRESIN (F_CPU/(PRESCALER*SINEWAVELENGTH)) |
| #define | USART_BAUDRATE 9600 |
| #define | UBRR_VALUE (((F_CPU/(USART_BAUDRATE*16UL)))-1) |
| #define | cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) |
| #define | sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) |
| #define | NOINIT __attribute__ ((section (".noinit"))) |
| #define | CALL " DL7BJ " |
| #define | PRG " BJ-Keyer " |
| #define | VER " V1.03 " |
| #define | NOTHING 0 |
| Keying states. Mehr ... | |
| #define | DIT_DAH_OFF 1 |
| #define | DAH_DIT_OFF 2 |
| #define | DIT_DAH_ON 3 |
| #define | DAH_DIT_ON 4 |
| #define | STRAIGHT 0 |
| Keyer mode. Mehr ... | |
| #define | IAMBIC_B 1 |
| #define | IAMBIC_A 2 |
| #define | ULTIMATIC 3 |
| #define | SINGLE_PADDLE 4 |
| #define | PADDLE_NORMAL 0 |
| Paddle Mode. Mehr ... | |
| #define | PADDLE_REVERSE 1 |
| #define | SENDING_NOTHING 0 |
| Sending Mode. Mehr ... | |
| #define | SENDING_DIT 1 |
| #define | SENDING_DAH 2 |
| #define | SENDING_SPC 3 |
| #define | SENDING_STRAIGHT 4 |
| #define | SENDING_AUTOMATIC 5 |
| #define | AUTO 0 |
| Sending Type. Mehr ... | |
| #define | MAN 1 |
| #define | LEFT_PADDLE PD2 |
| Ports. Mehr ... | |
| #define | RIGHT_PADDLE PD3 |
| #define | STRAIGHT_KEY PD4 |
| #define | MORSE_LED PC3 |
| #define | MEM1 PD5 |
| #define | MEM2 PD6 |
| #define | MEM3 PD7 |
| #define | MEM4 PC0 |
| #define | MEM5 PB5 |
| #define | TRX1 PC1 |
| #define | TRX2 PC2 |
| #define | AUDIO PB3 |
| #define | AUDIO_EN PB4 |
| #define | SCL PC5 |
| #define | SDA PC4 |
| #define | ON 1 |
| #define | OFF 0 |
| #define | DIT 1 |
| #define | DAH 0 |
| #define | NO_KEY_PRESSED 0 |
| #define | KEY_PRESSED_DEBOUNCE 1 |
| #define | KEY_PRESSED 2 |
| #define | M_TRX1 1 |
| #define | M_TRX2 2 |
| #define | M_TON 3 |
| #define | M_TON_FREQ 4 |
| #define | M_IAMBICA 5 |
| #define | M_IAMBICB 6 |
| #define | M_ULTIMATIC 7 |
| #define | M_MEMORY 8 |
| #define | M_REVERSE 9 |
| #define | M_RATIO 10 |
| #define | M_WEIGHT 11 |
| #define | M_WPMBPM 12 |
| #define | M_MEMBUTTONMODE 13 |
| #define | M_RISETIME 14 |
| #define | M_DEBOUNCE 15 |
| #define | M_MAX 15 |
| #define | CLEARLINE " " |
| OLED. Mehr ... | |
| #define | NORMAL 0 |
| #define | MSGSIZE 60 |
| 60 Zeichen für jeden Textspeicher Mehr ... | |
Variablen | |
| uint8_t | LastPINDState |
| volatile uint8_t | EncoderTimer |
| 10ms Timer for Encoder Mehr ... | |
| volatile int8_t | EncoderCounter |
| Vor/Rück Zähler. Mehr ... | |
| volatile int8_t | EncoderPos |
| Encoderposition für WpM/BpM. Mehr ... | |
| volatile int8_t | EncoderPosConfig |
| Encoderposition für Einstellungen. Mehr ... | |
| volatile int8_t | EncoderPosSubConfig |
| Encoderposition für Submenues. Mehr ... | |
| uint16_t | StoreEEpromTimer |
| uint8_t | WpM |
| Aktuelle Zeichengeschwindigkeit. Mehr ... | |
| uint8_t | PaddleMode |
| Merker für Links / Rechts vertauscht. Mehr ... | |
| uint8_t | KeyerMode |
| Merker für Iambic A, Iambic B oder Ultimatic. Mehr ... | |
| uint8_t | KeyTX |
| volatile uint8_t | icnt |
| volatile uint8_t | ocr2a |
| volatile uint8_t | lastButton |
| Wert der letzten Buttonabfrage. Mehr ... | |
| volatile uint16_t | DitMillis |
| Dauer eines Dits. Mehr ... | |
| volatile uint16_t | DahMillis |
| Dauer eines Dahs. Mehr ... | |
| volatile uint16_t | SpcMillis |
| Dauer einer Pause zwischen den Zeichen. Mehr ... | |
| volatile uint8_t | StateStraightKeyPressed |
| Merker für StraightKey betätigt. Mehr ... | |
| volatile uint8_t | TimerStraightKeyPressed |
| Timer Variable für Entprellung. Mehr ... | |
| volatile uint8_t | StatePaddleDitKeyPressed |
| Merker für Paddle betätigt. Mehr ... | |
| volatile uint8_t | TimerPaddleDitKeyPressed |
| Timer Variable für Entprellung. Mehr ... | |
| volatile uint8_t | StatePaddleDahKeyPressed |
| Merker für Paddle betätigt. Mehr ... | |
| volatile uint8_t | TimerPaddleDahKeyPressed |
| Timer Variable für Entprellung. Mehr ... | |
| volatile uint8_t | StateButtonPressed |
| Merker für Speichertaste betätigt. Mehr ... | |
| volatile uint8_t | TimerButtonPressed |
| Timer Variable für Entprellung. Mehr ... | |
| volatile uint8_t | StateRiseTimeCounter |
| Zähler für Anstieg des Mithörtons. Mehr ... | |
| volatile uint8_t | StateRiseTime |
| uint16_t | MenuCtrlTimer |
| Diverse Zähler für Timer 0. Mehr ... | |
| volatile uint16_t | t_delayms |
| Timer 0 max. 65535ms, all purpose timer variable. Mehr ... | |
| volatile uint16_t | t_elementlength |
| Timer 0 max. 65535ms, element length of dit or dah. Mehr ... | |
Globale Variablen, Definitionen und Prototypen.
| #define AUTO 0 |
Sending Type.
| #define CLEARLINE " " |
OLED.
| #define LEFT_PADDLE PD2 |
Ports.
| #define MSGSIZE 60 |
60 Zeichen für jeden Textspeicher
| #define NOTHING 0 |
Keying states.
| #define PADDLE_NORMAL 0 |
Paddle Mode.
| #define SENDING_NOTHING 0 |
Sending Mode.
| #define STRAIGHT 0 |
Keyer mode.
| volatile uint16_t DahMillis |
Dauer eines Dahs.
| volatile uint16_t DitMillis |
Dauer eines Dits.
| volatile int8_t EncoderCounter |
Vor/Rück Zähler.
| volatile int8_t EncoderPos |
Encoderposition für WpM/BpM.
| volatile int8_t EncoderPosConfig |
Encoderposition für Einstellungen.
| volatile int8_t EncoderPosSubConfig |
Encoderposition für Submenues.
| volatile uint8_t EncoderTimer |
10ms Timer for Encoder
| uint8_t KeyerMode |
Merker für Iambic A, Iambic B oder Ultimatic.
| volatile uint8_t lastButton |
Wert der letzten Buttonabfrage.
| uint16_t MenuCtrlTimer |
Diverse Zähler für Timer 0.
Wartezeit bis zur Betriebsanzeige nach Config
| uint8_t PaddleMode |
Merker für Links / Rechts vertauscht.
| volatile uint16_t SpcMillis |
Dauer einer Pause zwischen den Zeichen.
| volatile uint8_t StateButtonPressed |
Merker für Speichertaste betätigt.
| volatile uint8_t StatePaddleDahKeyPressed |
Merker für Paddle betätigt.
| volatile uint8_t StatePaddleDitKeyPressed |
Merker für Paddle betätigt.
| volatile uint8_t StateRiseTime |
Timer für Anstieg des Mithörtons
| volatile uint8_t StateRiseTimeCounter |
Zähler für Anstieg des Mithörtons.
| volatile uint8_t StateStraightKeyPressed |
Merker für StraightKey betätigt.
| volatile uint16_t t_delayms |
Timer 0 max. 65535ms, all purpose timer variable.
| volatile uint16_t t_elementlength |
Timer 0 max. 65535ms, element length of dit or dah.
| volatile uint8_t TimerButtonPressed |
Timer Variable für Entprellung.
| volatile uint8_t TimerPaddleDahKeyPressed |
Timer Variable für Entprellung.
| volatile uint8_t TimerPaddleDitKeyPressed |
Timer Variable für Entprellung.
| volatile uint8_t TimerStraightKeyPressed |
Timer Variable für Entprellung.
| uint8_t WpM |
Aktuelle Zeichengeschwindigkeit.