This commit is contained in:
2025-12-24 17:21:08 +09:00
parent a96323de19
commit 96dc62d8dc
2302 changed files with 455822 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
#ifndef SCMT_H_
#define SCMT_H_
/* This code will also work with SUCMT, just be aware of it using RCLK instead of OSCCLK! */
/* Start SCMT timer.
Will set GPIO=HIGH if requested by SCMT_TOGGLE_GPIO */
void scmt_module_start(void);
/* Fetch SCMT timer value.
Will set GPIO=LOW again after several calls if requested by SCMT_TOGGLE_GPIO */
uint32_t scmt_module_read(void);
/* Wait for a specific number of ticks
- ticks: SCMT timer ticks to wait. Use SCMT_MS2TICKS)(ms) if you want to wait in milliseconds
NOT SAFE FOR OVERLFOWS: Don't use if expected to run for over 9 hours */
void scmt_wait_ticks(uint32_t ticks);
#endif