Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: ORTP-L_SensorTest ORTP-L_V01 ORTP-L_V01 RIT_Demo
RIT Class Reference
Repetitive Interrupt Timer (RIT) class. More...
#include <RIT.h>
Public Member Functions | |
| RIT (uint32_t ms) | |
| Constructor. | |
| void | setup_ms (uint32_t ms) |
| Setup timing in ms. | |
| void | setup_us (uint32_t us) |
| Setup timing in us. | |
| void | attach (void(*fptr)(void)) |
| Attach custom interrupt handler replacing default. | |
| void | detach (void) |
| Restore default interrupt handler. | |
| void | append (void(*fptr)(void)) |
| Append function isr to global interrupt handler. | |
| void | unappend () |
| Remove function isr from global interrupt handler. | |
| void | enable (void) |
| Enable RIT & Interrupt. | |
| void | disable (void) |
| Disable RIT & Interrupt. | |
| void | power_enable (void) |
| Power up RIT. | |
| void | power_disable (void) |
| Power down RIT. | |
Detailed Description
Repetitive Interrupt Timer (RIT) class.
Sample Code:
DigitalOut rit_led(LED3);
//Our function isr. void RIT_IRQHandler(void) { rit_led=!rit_led; // Flash a Led }
RIT rit(1000); //Set interval to 1000 ms or 1 second.
rit.append(RIT_IRQHandler); //Append our own function ISR. rit.enable();
wait(10); //wait 10 seconds (and watch the led flashing).
rit.disable(); rit.unappend();
Definition at line 54 of file RIT.h.
Constructor & Destructor Documentation
| RIT | ( | uint32_t | ms ) |
Member Function Documentation
| void append | ( | void(*)(void) | fptr ) |
Append function isr to global interrupt handler.
fptr the function isr to be called from within the default interrupt handler.
| void attach | ( | void(*)(void) | fptr ) |
| void power_disable | ( | void | ) |
| void setup_ms | ( | uint32_t | ms ) |
| void setup_us | ( | uint32_t | us ) |
Generated on Tue Jul 12 2022 21:56:47 by
1.7.2