Thomas MARGOTTIN
/
Fragile
exemple gene carre
Fork of FSK_EX by
main.cpp
- Committer:
- rpresa
- Date:
- 2016-05-23
- Revision:
- 0:a882c1c6acaa
- Child:
- 1:b4e439085e82
File content as of revision 0:a882c1c6acaa:
#include "mbed.h" DigitalOut FSK(p20); void myIRQ() { LPC_TIM0->IR |= 1 << 0; FSK = !FSK; } int main() { while (1) { LPC_TIM0->MR0 = 104; // Match count for 114kHz LPC_TIM0->MCR = 3; // Interrupt and Reset on Match LPC_TIM0->TCR = 1; // Enable Timer0 NVIC_SetVector(TIMER0_IRQn,(uint32_t)&myIRQ); NVIC_EnableIRQ(TIMER0_IRQn); } }