baseline build

Dependencies:   FastPWM mbed-os mbed

MillisecondCounter.cpp

Committer:
jrhodes5150
Date:
2017-06-19
Revision:
0:8a420ac6394e

File content as of revision 0:8a420ac6394e:

#include "mbed.h"
//#include "RtosTimer.h"
#include "MillisecondCounter.h"

static void CountMilliseconds(void const *arg);
static unsigned milliseconds = 0;

static rtos::RtosTimer millisecondTimer(&CountMilliseconds, osTimerPeriodic);

void StartTimer_ms(void)
{
    millisecondTimer.start(1);
}

unsigned GetTime_ms(void)
{
    return( milliseconds );
}

static void CountMilliseconds(void const *arg)
{
    milliseconds++;
}