You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/c.md
+7-1Lines changed: 7 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ The namespaces for types and variable names are not seperated as they should be,
26
26
27
27
#### Doubles
28
28
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.
30
30
31
31
#### Designated initializers
32
32
@@ -89,6 +89,12 @@ enum { _clkfreq = 297000000 };
89
89
```
90
90
may be used to specify 297 MHz.
91
91
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:
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