Skip to content

Commit fa76071

Browse files
committed
Clarified xtlfreq
1 parent 75f4886 commit fa76071

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

doc/c.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The namespaces for types and variable names are not seperated as they should be,
2626

2727
#### Doubles
2828

29-
The `double` type is implemented as a 32 bit IEEE single precision float (the same as `float`). This doesn't meet the requirements in the C99 and later standards for the range available for double.
29+
The `double` type is implemented as a 32 bit IEEE single precision float (the same as `float`). This doesn't meet the requirements in the C99 and later standards for the range available for double. At some point this will change.
3030

3131
#### Designated initializers
3232

@@ -89,6 +89,12 @@ enum { _clkfreq = 297000000 };
8989
```
9090
may be used to specify 297 MHz.
9191

92+
On the P2, the crystal frequency may also be specified with an `_xtlfreq` enum. So for example to specify 297 MHz with a 25 MHz clock, do:
93+
```
94+
enum { _clkfreq = 297000000, _xtlfreq = 25000000 };
95+
```
96+
in the top level file.
97+
9298
#### _clkset
9399

94100
Header files `sys/p2es_clock.h` and `sys/p2d2_clock.h` are provided for convenience in calculating a mode. To use these, define the macro P2_TARGET_MHZ before including the appropriate header file for your board. The header will calculate and define macros `_SETFREQ` (containing the mode bits) and `_CLOCKFREQ` (containing the frequency; this should normally be `P2_TARGET_MHZ * 1000000`). So for example to set the frequency to 180 MHz you would do:

0 commit comments

Comments
 (0)