libws libws
WSwan hardware library for the Wonderful toolchain
|
Macros | |
#define | WS_HZ_TO_DIVIDER(hz, clock_hz) |
Convert a frequency in Hertz to a clock divider value. |
Functions | |
void | ws_portcpy (uint16_t port, const void __far *src, uint16_t count) |
Copy memory data to I/O ports, in order. | |
void | ws_delay_us (uint16_t us) |
Delay for a set number of microseconds. | |
void | ws_delay_ms (uint16_t ms) |
Delay for a set number of milliseconds. |
#define WS_HZ_TO_DIVIDER | ( | hz, | |
clock_hz ) |
void ws_delay_ms | ( | uint16_t | ms | ) |
Delay for a set number of milliseconds.
This is not recommended - use only when necessary! Not halting the CPU can lead to higher power consumption. The recommended approach is configuring an interrupt handler and using cpu_halt() - which will then sleep until any interrupt occurs.
ms | Approximate number of milliseconds. |
void ws_delay_us | ( | uint16_t | us | ) |
Delay for a set number of microseconds.
This is not recommended - use only when necessary! Not halting the CPU can lead to higher power consumption. The recommended approach is configuring an interrupt handler and using cpu_halt() - which will then sleep until any interrupt occurs.
us | Approximate number of microseconds. |
void ws_portcpy | ( | uint16_t | port, |
const void __far * | src, | ||
uint16_t | count ) |
Copy memory data to I/O ports, in order.
port | Destination port. |
src | Source pointer. |
count | Count, in bytes. |