Navigation bar
  Start Previous page  7 of 9  Next page End Home  1 2 3 4 5 6 7 8 9  

IAR Aug 2000
For the configurations made earlier in the simple example project above, the device
driver functions listed in table 1 will be generated by default. The drivers are generated
as one *.c file and one *.h file for each peripheral module, and contain both initialization,
run-time control, and interrupt handler functions.
Bus controller driver functions
Purpose
MA_Init_CPU()
Initialize the bus controller according to the dialog box.
MA_Wait_CPU()
Cause transition to wait mode.
MA_Stop_CPU()
Cause transition to stop mode.
MA_PowerControl_CPU()
Change clocking/power consumption.
MA_SoftwareReset_CPU()
Reset the chip.
MA_TrigWDT_CPU()
Trig the watchdog timer.
MA_CRC_CPU()
Calculate checksum.
MA_IntHandler_WDT_CPU()
Interrupt handler for the watchdog interrupt.
MA_IntHandler_NMI_CPU()
Interrupt handler for the NMI interrupt.
Interrupt controller driver
functions
Purpose
MA_Init_INT()
Initialize the interrupt controller according to the dialog box.
MA_SetPriorityMask_INT()
Change the priority mask for interrupt filtering.
MA_IntHandler_INT1_INT()
Interrupt handler for the external INT1 interrupt.
MA_IntHandler_INT2_INT()
Interrupt handler for the external INT2 interrupt.
Serial communications driver
functions
Purpose
MA_InitCh1_SCI()
Initialize the UART channel 1 according to the dialog box.
MA_PutCharCh1_SCI()
Send a character on channel 1.
MA_PutStringCh1_SCI()
Send a character string on channel 1.
MA_GetCharCh1_SCI()
Receive a character from channel 1.
MA_GetStringCh1_SCI()
Receive a character string from channel 1.
MA_IntHandler_TXI1_SCI()
Interrupt handler for the channel 1 transmit empty interrupt.
MA_IntHandler_RXI1_SCI()
Interrupt handler for the channel 1 receive full interrupt.
Table 1: Device driver functions generated from the example project
Figure 5 shows an example of how unnecessary driver functions can be removed from
code generation; the functions for sending and receiving character strings are removed
in this case. 
Microcontroller.com White Papers Previous page Top Next page