Update documentation
This commit is contained in:
20
src/main.c
20
src/main.c
@@ -18,14 +18,14 @@
|
|||||||
int Init(void)
|
int Init(void)
|
||||||
{
|
{
|
||||||
// MOSFETS control things like the heating element
|
// 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().
|
// to a default state via MOS_Init().
|
||||||
|
|
||||||
MOS_Init();
|
MOS_Init();
|
||||||
|
|
||||||
// The serial interface is required for output
|
// The serial interface is required for output
|
||||||
// functions like Info() and Error() and it uses
|
// 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.
|
// possible and make sure to enable interrupts.
|
||||||
|
|
||||||
USART_Init();
|
USART_Init();
|
||||||
@@ -34,10 +34,9 @@ int Init(void)
|
|||||||
Info("Initializing...");
|
Info("Initializing...");
|
||||||
|
|
||||||
// There is a possiblity to use interrupt signals
|
// There is a possiblity to use interrupt signals
|
||||||
// for I2C communication but it requires to have
|
// for I2C communication but only as one large
|
||||||
// one large routine for basically the whole I2C
|
// branching routine for the whole I2C system.
|
||||||
// implementation. The blocking approach used right
|
// The blocking approach used right now is fine.
|
||||||
// now is fine.
|
|
||||||
|
|
||||||
I2C_Init();
|
I2C_Init();
|
||||||
PWM_Init();
|
PWM_Init();
|
||||||
@@ -47,9 +46,8 @@ int Init(void)
|
|||||||
|
|
||||||
// Only FAN01 and FAN02 are receiving the correct
|
// Only FAN01 and FAN02 are receiving the correct
|
||||||
// frequency (25 KHz) right now. The 16-bit timer on
|
// frequency (25 KHz) right now. The 16-bit timer on
|
||||||
// the ATMega32A only has two outputs so it would
|
// the ATMega32A has two outputs so it would require
|
||||||
// require software PWM to have a variable frequency
|
// software PWM to have a variable frequency on PD7.
|
||||||
// on pin PD7.
|
|
||||||
|
|
||||||
// A simple implementation will take up around 30-50
|
// A simple implementation will take up around 30-50
|
||||||
// percent of CPU time. Faster approaches are quite
|
// percent of CPU time. Faster approaches are quite
|
||||||
@@ -62,8 +60,8 @@ int Init(void)
|
|||||||
|
|
||||||
// The I2C_SetChannel command changes the channel
|
// The I2C_SetChannel command changes the channel
|
||||||
// setting of the PCA9546 I2C multiplexer. Any
|
// setting of the PCA9546 I2C multiplexer. Any
|
||||||
// AHT20 command after it will only be sent on
|
// command after it will be sent to the device
|
||||||
// the respective channel.
|
// listening on that channel.
|
||||||
|
|
||||||
I2C_SetChannel(AHT01);
|
I2C_SetChannel(AHT01);
|
||||||
I2C_AHT20_Init();
|
I2C_AHT20_Init();
|
||||||
|
|||||||
Reference in New Issue
Block a user