aboutsummaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/main.c b/src/main.c
index 8d9eb19..b29d49f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -27,7 +27,7 @@ init_pio(void)
// Load interrupt vector
port_b_ctrl = ISR_ADDRESS(port_b_isr_ptr);
// Interrupt word - interrupt if any pin goes low, mask follows
- port_b_ctrl = PIO_INT_CTRL(PIO_INT_EN | PIO_OR | PIO_LOW | PIO_MASK);
+ port_b_ctrl = PIO_INT_CTRL(PIO_INT_EN | PIO_OR | PIO_LOW | PIO_MASK);
// Mask - 0 means to check line
port_b_ctrl = 0x80;
@@ -47,13 +47,13 @@ init_ctc(void)
/* 200Hz clock */
ctc_channel_2 = CTC_CTRL(CTC_INT_BIT | CTC_PRESCALER_BIT
- | CTC_TIME_CONST_BIT | CTC_RST_BIT);
+ | CTC_TIME_CONST_BIT | CTC_RST_BIT);
ctc_channel_2 = 0;
- /* ctc_channel_3 = (CPU_FREQ / 256 / 144); */
+ /* ctc_channel_3 = (CPU_FREQ / 256 / 144); */
ctc_channel_3 = CTC_CTRL(CTC_INT_BIT | CTC_PRESCALER_BIT
- | CTC_TIME_CONST_BIT | CTC_RST_BIT);
+ | CTC_TIME_CONST_BIT | CTC_RST_BIT);
ctc_channel_3 = 0; // 256
// Interrupt table for CTC
@@ -82,11 +82,11 @@ init_sio(void)
ISR_ADDRESS(rx_isr_ptr) // int_table_rx
};
- for (u8 i = 0; i < LENGTH(sio_a_cfg); ++i)
- sio_a_ctrl = sio_a_cfg[i];
+ for (u8 i = 0; i < LENGTH(sio_a_cfg); ++i)
+ sio_a_ctrl = sio_a_cfg[i];
- for (u8 i = 0; i < LENGTH(sio_b_cfg); ++i)
- sio_b_ctrl = sio_b_cfg[i];
+ for (u8 i = 0; i < LENGTH(sio_b_cfg); ++i)
+ sio_b_ctrl = sio_b_cfg[i];
}
// copy code to ram, so function pointer is modifyable
@@ -122,10 +122,10 @@ main(void)
init_pio();
init_sio();
- // Interrupt mode 2
- IM(2);
- // Enable interrupts
- EI;
+ // Interrupt mode 2
+ IM(2);
+ // Enable interrupts
+ EI;
addstr("Starting system ...\r\n");
_menu();