Kim Youngsik / Mbed 2 deprecated 0ROBOFRIEN_FCC_v1_12

Dependencies:   mbed BufferedSerial ConfigFile

Committer:
skyyoungsik
Date:
Wed Nov 28 13:06:23 2018 +0000
Revision:
1:9530746906b6
Parent:
0:3473b92e991e
test1

Who changed what in which revision?

UserRevisionLine numberNew contents of line
skyyoungsik 0:3473b92e991e 1 #include "mbed.h"
skyyoungsik 0:3473b92e991e 2 #include "millis.h"
skyyoungsik 0:3473b92e991e 3 /*
skyyoungsik 0:3473b92e991e 4 millis.cpp
skyyoungsik 0:3473b92e991e 5 Copyright (c) 2016 Zoltan Hudak <hudakz@inbox.com>
skyyoungsik 0:3473b92e991e 6 All rights reserved.
skyyoungsik 0:3473b92e991e 7
skyyoungsik 0:3473b92e991e 8 This program is free software: you can redistribute it and/or modify
skyyoungsik 0:3473b92e991e 9 it under the terms of the GNU General Public License as published by
skyyoungsik 0:3473b92e991e 10 the Free Software Foundation, either version 3 of the License, or
skyyoungsik 0:3473b92e991e 11 (at your option) any later version.
skyyoungsik 0:3473b92e991e 12
skyyoungsik 0:3473b92e991e 13 This program is distributed in the hope that it will be useful,
skyyoungsik 0:3473b92e991e 14 but WITHOUT ANY WARRANTY; without even the implied warranty of
skyyoungsik 0:3473b92e991e 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
skyyoungsik 0:3473b92e991e 16 GNU General Public License for more details.
skyyoungsik 0:3473b92e991e 17
skyyoungsik 0:3473b92e991e 18 You should have received a copy of the GNU General Public License
skyyoungsik 0:3473b92e991e 19 along with this program. If not, see <http://www.gnu.org/licenses/>.
skyyoungsik 0:3473b92e991e 20 */
skyyoungsik 0:3473b92e991e 21
skyyoungsik 0:3473b92e991e 22 volatile unsigned long _millis;
skyyoungsik 0:3473b92e991e 23
skyyoungsik 0:3473b92e991e 24 void millisStart(void) {
skyyoungsik 0:3473b92e991e 25 SysTick_Config(SystemCoreClock / 1000);
skyyoungsik 0:3473b92e991e 26 }
skyyoungsik 0:3473b92e991e 27
skyyoungsik 0:3473b92e991e 28 extern "C" void SysTick_Handler(void) {
skyyoungsik 0:3473b92e991e 29 _millis++;
skyyoungsik 0:3473b92e991e 30 }
skyyoungsik 0:3473b92e991e 31
skyyoungsik 0:3473b92e991e 32 unsigned long millis(void) {
skyyoungsik 0:3473b92e991e 33 return _millis;
skyyoungsik 0:3473b92e991e 34 }
skyyoungsik 0:3473b92e991e 35
skyyoungsik 0:3473b92e991e 36
skyyoungsik 0:3473b92e991e 37