Steroid Micros  Intec Automation Inc.
home | contact faq | documentation | applications | links | news | about Intec

WildFire Runtime Libraries

View Larger Image


Library of WildFire (MCF5282) Specific Functions

These well documented library functions, specific to the WidFire (ColdFire MCF5282) microcontroller greatly simplify the development process, being fully compatible with the GNU C/C++ compiler. It also contains functions to interface to the OpenTCP TCP/IP stack. A large number of annotated tutorial programs further assist in reducing the development cycle.


Analog to Digital Conversion (A/D)


ad_init( sample_tics, mode)

Initializes analog to digital conversion module on the 5282

ad_get( chan )

Returns an average, or the most recent conversion value

mv_get( ad_count )

Converts a raw conversion value to millivolts


Console Input Output (In Addition to stdio.h)


chkch( )

Checks for a character on the console returns immediately

kbhit( )

Another name for chkch

getch( )

Gets a character from the console, waits indefinitely


Digital Input and Output (I/O)


dio_init( port, mask, dir )

Initialize a digital pin(s) to be either input or output

dio_set( port, mask, value )

Set the value of a digital pin(s) to either high or low

dio_get( port )

Get the value of the digital pins on the specified port


DMA 32-Bit Timers (DT)


dt_init( port, level_prior, isr )

Initialize a DMA timer port

dt_act_set( port, count, action )

Set the action for the output compare pin on the specified port

dt_edge_set( port, edge )

Set the edge for the input capture pin on the specified port

dt_count_get( port )

Get the current count for the port specified

dt_freq_set( port, freq )

Set the frequency for the counter on the port specified

dt_flag_clear( port, source )

Clear the interrupt flag for the port specified


Edge Port (IRQ)


irq_init( pin, mode, isr )

Initialize an IRQ pin to trigger an interrupt on a specified edge

irq_flag_clear( pin )

Clear the interrupt flag for the specified IRQ pin


External Flash (XFlash)


xf_erase( start, end, callback )

Erase one or more sectors in external flash

xf_read( addr, offset, size, callback )

Copies from flash to address in memory

xf_write( addr, offset, size, callback )

Copies from address in memory to flash

xf_sec_size( )

Get the erase sector size in external flash in bytes

xf_size( )

Get the size of external flash in bytes

xf_verify( addr, offset, size )

Verifies data in flash against data in memory


General Purpose Timers (GPT)


gpt_ic_init( port, pin, level_prior, isr )

Initialize the GPT pin to input capture mode

gpt_ic_edge_set( port, pin, edge )

Set the input capture edge for the specified GPT pin

gpt_oc_init( port, pin, … )

Initialize the GPT pin to output compare mode

gpt_oc_act_set( port, pin, … )

Set the action for the output compare pin

gpt_count_get( port, pin )

Get the current count of the GPT timer

gpt_freq_set( port, freq )

Set the frequency of the GPT timer

gpt_flag_clear( port, pin )

Clear the interrupt flag




isr_register( isr, vector, …)

Add a handler to the dBUG vector table

isr_remove( isr )

Remove this handler from the dBUG vector table

ipl_set( level )

Set the interrupt priority levels to be recognized by the CPU

enable( )

Enable all interrupts

disable( )

Disable All interrupts


LCD and Keypad (LCD/Kpd)


lcd_init( line_font, status_blink )

Initialize the LCD screen with lines, font, cursor, cursor status

lcd_locate( position )

Set the position of the cursor on the LCD screen

lcd_putch( c )

Put a character to the LCD screen at the cursor position

lcd_putstr( s )

Put a string to the LCD screen at the cursor position

lcd_clear( line )

Clear all text on the LCD screen

lcd_control( code )

Send a control code to the LCD screen.



kpd_init( )

Initialize the matrix keypad

kpd_chkch( )

Check for a key pressed on the keypad and return

kpd_getch( )

Wait for a key press and return the key.


Periodic Interrupt Timers (PIT)


pit_init( channel, clkdiv, … )

Initialize a PIT with a clock divider, initial count, and isr

pit_get( channel )

Get the current count for the PIT

pit_flag_clear( channel )

Clear the PIT interrupt flag


Real Time Clock (RTC)


rtc_get( )

Get the time from the RTC as a TimeStruct

rtc_set( time )

Set the time on the RTC with a TimeStruct

rtc_alarm_set( time )

Set the RTC alarm and turn the board off, board will wake at “time”


Secure Digital Card (SD)


sd_init( )

Initialize the SD card for reading and writing.

sd_earse( start, end )

Erase one or more sectors on the SD card

sd_read( addr, offset, size, callback )

Copies from SD to address in memory

sd_write( addr, offset, size, callback )

Copies from address in memory to SD card

sd_verify( addr, offset, size, callback )

Verifies data on SD card against data in memory

sd_sec_size( size )

Return the sector size for the SD card

sd_size( size )

Return the SD card writable size in bytes


Universal Asynchronous Receiver Transmitter (UART)


uart_init( port, parity, … )

Initialize a UART with a baud, parity, stop bits, etc.

uart_getch( port )

Wait for a character from the UART and return it

uart_putch( port, c )

Put a character on the UART

uart_putstr( port, s )

Put a string on the UART

uart_chkch( port )

Check for a character on the UART and return



uart_com3_dtr_set( state )

Set or clear DTR line on COM3

uart_com3_rts_set( state )

Set or clear the RTS line on COM3


Watchdog Timer (WDT)


wdt_disable( )

Disable the watchdog timer

wdt_timeout_set( count )

Set the timeout length for the watchdog timer

wdt_feed( )

Service the watchdog timer to prevent it from timing out


Development Kits


Copyright © 2004 Intec Automation Inc.

2751 Arbutus Rd. Victoria BC Canada V8N 5X7 | 1-866-721-5150 | Terms of Use & Policy
View Cart 1 866 721 5150