#include <68332/types.h>
Go to the source code of this file.
Defines | |
#define | FCRYSTAL 32768L |
#define | CLOCK8MHZ 0x3f00 |
#define | CLOCK16MHZ 0x7f00 |
#define | CLOCK25MHZ 0xd700 |
Enumerations | |
enum | reset_state_t { RESET_EXT, RESET_POW, RESET_SW, RESET_HLT, RESET_SYS, RESET_TST } |
Functions | |
int | set_sim_iarb (int iarb) |
int | set_processor_speed (int speed) |
uint32 | get_processor_freq (void) |
reset_state_t | get_reset_state (void) |
uint8 | read_porte (void) |
void | write_porte (uint8 val) |
int | set_porte_data_direction (uint8 direction_mask) |
int | set_porte_pin_assignment (uint8 pin_assignment) |
uint8 | read_portf (void) |
void | write_portf (uint8 val) |
int | set_portf_data_direction (uint8 direction_mask) |
int | set_portf_pin_assignment (uint8 pin_assignment) |
int | set_watchdog (int enable, int prescale, int timeout) |
void | reset_watchdog (void) |
int | periodic_interrupt_setup (void(*function)(), int level, int vector, int prescale, uint8 timer) |
void | barrier_read_uint16 (uint16 val) |
void | barrier (void) |
To use the functions defined in this file, include <68332/sim.h> and link libsim.a.
|
|
|
8.389 Mhz |
|
16.778 Mhz |
|
25.166 Mhz |
|
Possible reset states. |
|
Set the interrupt arbitration ID for the SIM.
|
|
Set processor speed. This function will not return until the SLOCK bit shows the synthesizer is locked in on the set speed.
|
|
Get processor speed. This function returns the current CPU frequency (measured in cycles per second) based on the settings of the SYNCR register. |
|
Query how the processor was reset.
|
|
Reads IO port E.
|
|
Writes IO port E. |
|
Sets the data direction register for IO port E. Set the pins on port E to input or output.
|
|
Sets the pin assignment for IO port E. Sets pins in port E to either standard I/O, or a control bus signal. See section D.2.8 of the 68332 users guide for details.
|
|
Reads IO port F.
|
|
Writes IO port F. |
|
Sets the data direction register for IO port F. Set the pins on port F to input or output.
|
|
Set the pin assignment for IO port F. Sets pins in port F to either standard I/O, or a control bus signal. See section D.2.11 of the 68332 users guide for details.
|
|
Control the system watchdog. Turns on/off the system watchdog. This can be used to reset the system if the watchdog timer is not reset (see reset_watchdog()).
|
|
Resets the watchdog timer. Must be called before the watchdog timer times out to prevent the system from resetting. |
|
Set up a periodic timer interrupt function.
|
|
No-op routine that allows a parameter to be passed. Used to prevent instruction reordering by the compiler.
|
|
No-op routine used to prevent instruction reordering by the compiler. |