#include "SFBTypes.h"
Go to the source code of this file.
Data Structures | |
struct | clockConfiguration |
The internal hardware parameters associated with a given CPU clock speed. More... | |
Typedefs | |
typedef struct clockConfiguration | ClockConfiguration |
The internal hardware parameters associated with a given CPU clock speed. | |
typedef void(* | ClockSpeedChangeCallback )(u32 newClockSpeed) |
Declaration for a handler function to be called after a clock speed change has occurred. | |
Enumerations | |
enum | ClockSpeedCode { CSC_UNSET = 0, CSC_12MHZ = 1, CSC_24MHZ = 2, CSC_36MHZ = 3, CSC_48MHZ = 4, CSC_60MHZ = 5, CSC_72MHZ = 6, CSC_MAX = 7, CSC_MIN_MHZ = CSC_12MHZ, CSC_MAX_MHZ = CSC_72MHZ, CSC_AUTO = 8 } |
The possible 'speed code' values for setting the CPU clock speed, as used by SFBProcessor::getCode and SFBProcessor::setCode. More... | |
Functions | |
const ClockConfiguration * | getCurrentClockConfiguration () |
Access the parameters of the current clock configuration. | |
const ClockConfiguration * | getClockConfigurationForCode (u32 code) |
Access the parameters of the clock configuration associated with code. | |
u32 | getCCLK () |
Return the current clock speed in Hz. | |
u8 | getCCLKCode () |
Return the current clock speed code. | |
void | setClockSpeed (u32 code) |
Set the clock speed to code. | |
ClockSpeedChangeCallback | setClockSpeedChangeCallback (ClockSpeedChangeCallback callback) |
Set the handler function to be called after a clock speed change has occurred to callback. |
typedef struct clockConfiguration ClockConfiguration |
The internal hardware parameters associated with a given CPU clock speed.
Primarily intended for internal use.
typedef void(* ClockSpeedChangeCallback)(u32 newClockSpeed) |
Declaration for a handler function to be called after a clock speed change has occurred.
enum ClockSpeedCode |
The possible 'speed code' values for setting the CPU clock speed, as used by SFBProcessor::getCode and SFBProcessor::setCode.
u32 getCCLK | ( | ) |
Return the current clock speed in Hz.
u8 getCCLKCode | ( | ) |
Return the current clock speed code.
const ClockConfiguration* getClockConfigurationForCode | ( | u32 | code | ) |
Access the parameters of the clock configuration associated with code.
Primarily intended for internal use.
const ClockConfiguration* getCurrentClockConfiguration | ( | ) |
Access the parameters of the current clock configuration.
Primarily intended for internal use.
void setClockSpeed | ( | u32 | code | ) |
Set the clock speed to code.
ClockSpeedChangeCallback setClockSpeedChangeCallback | ( | ClockSpeedChangeCallback | callback | ) |
Set the handler function to be called after a clock speed change has occurred to callback.
Avoid using this callback mechanism if possible! It is dangerous!
Would-be users of this mechanism be aware of the following:
callback | Pointer to handler function, or 0 to specify no function should be called back |