Skip to content

Commit

Permalink
23 Apr 2020 - Renamed trivial myClock name to myOneMsTaskTimerClock t…
Browse files Browse the repository at this point in the history
…o avoid prossible conflicts, by Rei Vilo
  • Loading branch information
Rei Vilo committed Apr 23, 2020
1 parent 8b9dede commit 4e4a650
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
12 changes: 6 additions & 6 deletions libraries/OneMsTaskTimer/OneMsTaskTimer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ void OneMsTaskTimer_int(void)
{
OneMsTaskTimer::_ticHandler();
}


#endif //if defined(__MSP430__)


Expand Down Expand Up @@ -271,27 +271,27 @@ void OneMsTaskTimer_int(void)
#define DEFAULT_TIMER 1
uint32_t timer_index_ = DEFAULT_TIMER;
static volatile uint32_t g_ulBase;
Clock_Handle myClock = NULL;
Clock_Handle myOneMsTaskTimerClock = NULL;
void OneMsTaskTimer_int(UArg arg);

void OneMsTaskTimer::start(uint32_t timer_index) {
Clock_Params clockParams;
Error_Block eb;
Error_init(&eb);

if (myClock == NULL){
if (myOneMsTaskTimerClock == NULL){
Clock_Params_init(&clockParams);
clockParams.period = (uint32_t)1000 / (uint64_t)Clock_tickPeriod;
clockParams.startFlag = FALSE;
clockParams.arg = (UArg)0x5555;

myClock = Clock_create(OneMsTaskTimer_int, clockParams.period, &clockParams, &eb);
myOneMsTaskTimerClock = Clock_create(OneMsTaskTimer_int, clockParams.period, &clockParams, &eb);
}
Clock_start(myClock);
Clock_start(myOneMsTaskTimerClock);
}

void OneMsTaskTimer::stop() {
Clock_stop(myClock);
Clock_stop(myOneMsTaskTimerClock);
}
void OneMsTaskTimer_int(UArg arg)
{
Expand Down
4 changes: 3 additions & 1 deletion libraries/OneMsTaskTimer/OneMsTaskTimer.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
added suppport for CC3200
by Stefan Sch
23 Apr 2020 - Renamed trivial myClock name to myOneMsTaskTimerClock to avoid prossible conflicts, by Rei Vilo
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
Expand Down Expand Up @@ -101,4 +103,4 @@ namespace OneMsTaskTimer {
void _ticHandler();
}

#endif
#endif

0 comments on commit 4e4a650

Please sign in to comment.