Commit 45d7a2

2026-04-16 11:24:16 Bob Green: -/-
programming/examples/pit.md ..
@@ 36,31 36,31 @@
```
#### gcc
```c
- /* PI/T Timer Register Addresses */
- #define pit_base ((unsigned char*) 0xaf0001)
+ * PI/T Timer Register Addresses */
+ #define pit_base ((volatile uint8_t*) 0xaf0001)
- #define pit_pgcr ((unsigned char*) pit_base)
- #define pit_psrr ((unsigned char*) pit_base+2)
- #define pit_paddr ((unsigned char*) pit_base+4)
- #define pit_pbddr ((unsigned char*) pit_base+6)
- #define pit_pcddr ((unsigned char*) pit_base+8)
- #define pit_pivr ((unsigned char*) pit_base+10)
- #define pit_pacr ((unsigned char*) pit_base+12)
- #define pit_pbcr ((unsigned char*) pit_base+14)
- #define pit_padr ((unsigned char*) pit_base+16)
- #define pit_pbdr ((unsigned char*) pit_base+18)
- #define pit_paar ((unsigned char*) pit_base+20)
- #define pit_pbar ((unsigned char*) pit_base+22)
- #define pit_pcdr ((unsigned char*) pit_base+24)
- #define pit_psr ((unsigned char*) pit_base+26)
+ #define pit_pgcr ((volatile uint8_t*) pit_base)
+ #define pit_psrr ((volatile uint8_t*) pit_base+2)
+ #define pit_paddr ((volatile uint8_t*) pit_base+4)
+ #define pit_pbddr ((volatile uint8_t*) pit_base+6)
+ #define pit_pcddr ((volatile uint8_t*) pit_base+8)
+ #define pit_pivr ((volatile uint8_t*) pit_base+10)
+ #define pit_pacr ((volatile uint8_t*) pit_base+12)
+ #define pit_pbcr ((volatile uint8_t*) pit_base+14)
+ #define pit_padr ((volatile uint8_t*) pit_base+16)
+ #define pit_pbdr ((volatile uint8_t*) pit_base+18)
+ #define pit_paar ((volatile uint8_t*) pit_base+20)
+ #define pit_pbar ((volatile uint8_t*) pit_base+22)
+ #define pit_pcdr ((volatile uint8_t*) pit_base+24)
+ #define pit_psr ((volatile uint8_t*) pit_base+26)
- #define pit_tcr ((unsigned char*) pit_base+32)
- #define pit_tivr ((unsigned char*) pit_base+34)
- #define pit_cprh ((unsigned char*) pit_base+38)
- #define pit_cprm ((unsigned char*) pit_base+40)
- #define pit_cprl ((unsigned char*) pit_base+42)
- #define pit_cntrh ((unsigned char*) pit_base+46)
- #define pit_cntrm ((unsigned char*) pit_base+48)
- #define pit_cntrl ((unsigned char*) pit_base+50)
- #define pit_tsr ((unsigned char*) pit_base+52)
+ #define pit_tcr ((volatile uint8_t*) pit_base+32)
+ #define pit_tivr ((volatile uint8_t*) pit_base+34)
+ #define pit_cprh ((volatile uint8_t*) pit_base+38)
+ #define pit_cprm ((volatile uint8_t*) pit_base+40)
+ #define pit_cprl ((volatile uint8_t*) pit_base+42)
+ #define pit_cntrh ((volatile uint8_t*) pit_base+46)
+ #define pit_cntrm ((volatile uint8_t*) pit_base+48)
+ #define pit_cntrl ((volatile uint8_t*) pit_base+50)
+ #define pit_tsr ((volatile uint8_t*) pit_base+52)
```
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9