0.3.1
|
Macros | |
#define | CPU_FRT_CLOCK_DIV_8 0x00 |
#define | CPU_FRT_CLOCK_DIV_32 0x01 |
#define | CPU_FRT_CLOCK_DIV_128 0x02 |
#define | CPU_FRT_CLOCK_DIV_RISING_EDGE 0x03 |
Not yet documented. | |
#define | CPU_FRT_NTSC_320_8_COUNT_1MS 0x0D1F |
#define | CPU_FRT_NTSC_320_32_COUNT_1MS 0x0348 |
#define | CPU_FRT_NTSC_320_128_COUNT_1MS 0x00D2 |
#define | CPU_FRT_NTSC_352_8_COUNT_1MS 0x0DFC |
#define | CPU_FRT_NTSC_352_32_COUNT_1MS 0x037F |
#define | CPU_FRT_NTSC_352_128_COUNT_1MS 0x00E0 |
#define | CPU_FRT_PAL_320_8_COUNT_1MS 0x0D08 |
#define | CPU_FRT_PAL_320_32_COUNT_1MS 0x0342 |
#define | CPU_FRT_PAL_320_128_COUNT_1MS 0x00D0 |
#define | CPU_FRT_PAL_352_8_COUNT_1MS 0x0DFC |
#define | CPU_FRT_PAL_352_32_COUNT_1MS 0x037F |
#define | CPU_FRT_PAL_352_128_COUNT_1MS 0x00E0 |
Typedefs | |
typedef void(* | cpu_frt_ihr_t) (void) |
Callback type. | |
Functions | |
static void | cpu_frt_count_set (uint16_t count) |
Set the 2-byte FRT tick count. | |
static uint16_t | cpu_frt_count_get (void) |
Obtain the current 2-byte FRT tick count. | |
static uint16_t | cpu_frt_input_capture_get (void) |
Obtain the ICR value. | |
static uint8_t | cpu_frt_interrupt_priority_get (void) |
Obtain the interrupt priority level for CPU-FRT. | |
static void | cpu_frt_interrupt_priority_set (uint8_t priority) |
Set the interrupt priority level for CPU-FRT. | |
void | cpu_frt_init (uint8_t clock_div) |
Fully initialize the CPU-FRT depending with a specific clock divisor. | |
Description goes here.
#define CPU_FRT_CLOCK_DIV_8 0x00 |
enum
. #define CPU_FRT_CLOCK_DIV_32 0x01 |
enum
. #define CPU_FRT_CLOCK_DIV_128 0x02 |
enum
. #define CPU_FRT_NTSC_320_8_COUNT_1MS 0x0D1F |
Tick count value representing 1ms for a NTSC machine in 320-mode with a \(\frac{\phi}{8}\) clock divisor.
#define CPU_FRT_NTSC_320_32_COUNT_1MS 0x0348 |
Tick count value representing 1ms for a NTSC machine in 320-mode with a \(\frac{\phi}{32}\) clock divisor.
#define CPU_FRT_NTSC_320_128_COUNT_1MS 0x00D2 |
Tick count value representing 1ms for a NTSC machine in 320-mode with a \(\frac{\phi}{128}\) clock divisor.
#define CPU_FRT_NTSC_352_8_COUNT_1MS 0x0DFC |
Tick count value representing 1ms for a NTSC machine in 352-mode with a \(\frac{\phi}{8}\) clock divisor.
#define CPU_FRT_NTSC_352_32_COUNT_1MS 0x037F |
Tick count value representing 1ms for a NTSC machine in 352-mode with a \(\frac{\phi}{32}\) clock divisor.
#define CPU_FRT_NTSC_352_128_COUNT_1MS 0x00E0 |
Tick count value representing 1ms for a NTSC machine in 352-mode with a \(\frac{\phi}{128}\) clock divisor.
#define CPU_FRT_PAL_320_8_COUNT_1MS 0x0D08 |
Tick count value representing 1ms for a PAL machine in 320-mode with a \(\frac{\phi}{8}\) clock divisor.
#define CPU_FRT_PAL_320_32_COUNT_1MS 0x0342 |
Tick count value representing 1ms for a PAL machine in 320-mode with a \(\frac{\phi}{32}\) clock divisor.
#define CPU_FRT_PAL_320_128_COUNT_1MS 0x00D0 |
Tick count value representing 1ms for a PAL machine in 320-mode with a \(\frac{\phi}{128}\) clock divisor.
#define CPU_FRT_PAL_352_8_COUNT_1MS 0x0DFC |
Tick count value representing 1ms for a PAL machine in 352-mode with a \(\frac{\phi}{8}\) clock divisor.
#define CPU_FRT_PAL_352_32_COUNT_1MS 0x037F |
Tick count value representing 1ms for a PAL machine in 352-mode with a \(\frac{\phi}{32}\) clock divisor.
#define CPU_FRT_PAL_352_128_COUNT_1MS 0x00E0 |
Tick count value representing 1ms for a PAL machine in 352-mode with a \(\frac{\phi}{128}\) clock divisor.
typedef void(* cpu_frt_ihr_t) (void) |
Callback type.
|
inlinestatic |
Set the 2-byte FRT tick count.
count | The 2-byte tick value to set. |
|
inlinestatic |
Obtain the current 2-byte FRT tick count.
|
inlinestatic |
Obtain the ICR value.
When a rising edge or falling edge of the input capture signal is detected, the current FRT tick count value is transferred to the ICR.
|
inlinestatic |
Obtain the interrupt priority level for CPU-FRT.
0
to 15
.
|
inlinestatic |
Set the interrupt priority level for CPU-FRT.
priority | The priority ranging from 0 to 15 . |
void cpu_frt_init | ( | uint8_t | clock_div | ) |
Fully initialize the CPU-FRT depending with a specific clock divisor.
This function is heavy handed in that it resets the interrupt priority levels for all FRT related interrupts, clears the interrupt handlers, and resets the FRT count.
This function will properly initialize the CPU-FRT on either the master or slave CPU.
clock_div | The clock divisor. |