mirror of
https://codeberg.org/SiB64/turbo_weather.git
synced 2026-05-01 15:14:22 +02:00
Compare commits
No commits in common. "987c3bd3266d6671659c285dc996325dd78ac567" and "aba1d1fbfd8378194dba525500c6c9f2305a513f" have entirely different histories.
987c3bd326
...
aba1d1fbfd
2 changed files with 3 additions and 7 deletions
|
|
@ -1,15 +1,13 @@
|
|||
|
||||
PROJ=bate
|
||||
|
||||
PATH:=/usr/local/bin:$(PATH)
|
||||
|
||||
default: all
|
||||
all: $(PROJ).hex
|
||||
|
||||
SN_bate = 1
|
||||
MCU_bate = attiny424
|
||||
|
||||
BATE_PERIOD=76
|
||||
BATE_PERIOD=152
|
||||
bate_CFLAGS = -DPERIOD=$(BATE_PERIOD)
|
||||
SN_bate_wdt = $(SN_bate)
|
||||
MCU_bate_wdt = $(MCU_bate)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
// Timer 1 TOP needs to be f_{clkio}/65536
|
||||
|
||||
#ifndef PERIOD
|
||||
# define PERIOD 76
|
||||
# define PERIOD 153
|
||||
#endif
|
||||
|
||||
// Save the calibrated period in EEPROM
|
||||
|
|
@ -43,7 +43,7 @@ void init_timer(uint8_t p)
|
|||
PORTB.DIRSET = Bit(0);
|
||||
MCLK.INTCTRL = TCA_SINGLE_CMP0_bm;
|
||||
MCLK.CMP0 = p;
|
||||
MCLK.CTRLA = TCA_SINGLE_CLKSEL_DIV2_gc | TCA_SINGLE_ENABLE_bm;
|
||||
MCLK.CTRLA = TCA_SINGLE_CLKSEL_DIV2_gc;
|
||||
MCLK.CTRLB = TCA_SINGLE_CMP0EN_bm | TCA_SINGLE_WGMODE_FRQ_gc;
|
||||
}
|
||||
|
||||
|
|
@ -296,8 +296,6 @@ void read_bate()
|
|||
|
||||
int main()
|
||||
{
|
||||
CCP = CCP_IOREG_gc;
|
||||
CLKCTRL.MCLKCTRLB = CLKCTRL_PDIV_2X_gc | 1;
|
||||
BATE_PORT.DIRSET = Bit(SCK_PORT) | Bit(DIN_PORT);
|
||||
init_timer(0);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue