#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