RC5 Demo
Functions
main.cpp File Reference

Main file which creates all dependencies to concrete hardware. More...

#include "usart0.h"
#include "timer0.h"
#include "portd.h"
#include "gpioportpin.h"
#include "int0.h"
#include "globalinterruptflag.h"
#include "logger.h"
#include "timermanager.h"
#include "application.h"

Functions

int main (void)
 Entry point. More...
 

Detailed Description

Main file which creates all dependencies to concrete hardware.

In this file all instances are created that have a binding to a special hardware resource (e.g. depending on the pin layout) or require configuration that shouldn't be scattered throughout the entire program (e.g. timer configuration).

The benefit of this approach is that all dependencies are located in one place and thus are easy to spot. Additionally the other components are fairly generic and don't require to now specific details (e.g. that the input pin is located on a GPIO port).

The downside obviously is that this approach requires to pass lots of dependencies down into the nested components, which means that each component needs to know every dependency of all of its children.

Function Documentation

◆ main()

int main ( void  )

Entry point.

Instances are created as local objects on the stack. Temporary variables are wrapped inside their own scope so that they are destroyed immediately after use.

Note
This function never returns.