Difference between revisions of "DevGuide/DesignOverview"
Jump to navigation
Jump to search
Line 40: | Line 40: | ||
bad : | bad : | ||
switch(UART) { | |||
switch(UART) { | |||
case UART0 : UARTO_write(...); break; | case UART0 : UARTO_write(...); break; | ||
case UART1 : UART1_write(...); break; | case UART1 : UART1_write(...); break; | ||
} | } | ||
UartWrite(...); | good : | ||
#define UartWrite(x) UART ## _write(x) | |||
UartWrite(...); |
Revision as of 05:31, 13 May 2008
Functional Diagram
Design Goals
-Static approach -Modularity -Hardware absraction -Runtime efficiency
Static Approach
-only "things that needs to be changed during flight are changeable -maximise compilation time resolutions
advantages Error checking Efficiency Safety/Robustness
Modularity
-Separation of concerns -Maintenability -Interface -C provide no dedicated mechanism for modularity -Main issues with modularity are configuration and dependancies
Hardware abstraction
-Segregate hardware dependant modules
Runtime Efficiency
bad : switch(UART) { case UART0 : UARTO_write(...); break; case UART1 : UART1_write(...); break; }
good :
#define UartWrite(x) UART ## _write(x)
UartWrite(...);