From ad987996e0afda716a23f5134e95d961207e7515 Mon Sep 17 00:00:00 2001 From: Leon Krieg Date: Wed, 4 Sep 2024 03:18:08 +0200 Subject: [PATCH] Update documentation --- src/main.c | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main.c b/src/main.c index 874ac0d..5f2ac23 100644 --- a/src/main.c +++ b/src/main.c @@ -18,14 +18,14 @@ int Init(void) { // MOSFETS control things like the heating element - // so this is the highest priority to initialize + // so they are the highest priority to initialize // to a default state via MOS_Init(). MOS_Init(); // The serial interface is required for output // functions like Info() and Error() and it uses - // IRQs so we need to initialize it as soon as + // IRQs, so we need to initialize it as soon as // possible and make sure to enable interrupts. USART_Init(); @@ -34,10 +34,9 @@ int Init(void) Info("Initializing..."); // There is a possiblity to use interrupt signals - // for I2C communication but it requires to have - // one large routine for basically the whole I2C - // implementation. The blocking approach used right - // now is fine. + // for I2C communication but only as one large + // branching routine for the whole I2C system. + // The blocking approach used right now is fine. I2C_Init(); PWM_Init(); @@ -47,9 +46,8 @@ int Init(void) // Only FAN01 and FAN02 are receiving the correct // frequency (25 KHz) right now. The 16-bit timer on - // the ATMega32A only has two outputs so it would - // require software PWM to have a variable frequency - // on pin PD7. + // the ATMega32A has two outputs so it would require + // software PWM to have a variable frequency on PD7. // A simple implementation will take up around 30-50 // percent of CPU time. Faster approaches are quite @@ -62,8 +60,8 @@ int Init(void) // The I2C_SetChannel command changes the channel // setting of the PCA9546 I2C multiplexer. Any - // AHT20 command after it will only be sent on - // the respective channel. + // command after it will be sent to the device + // listening on that channel. I2C_SetChannel(AHT01); I2C_AHT20_Init();