mbed OS5

Fork of UIPEthernet by Zoltan Hudak

Committer:
hudakz
Date:
Fri Jun 30 19:51:28 2017 +0000
Revision:
8:4acb22344932
Parent:
6:10e42359e217
Child:
9:e55652bed36c
'UIPEthernet' renamed to 'uIPEthernet'; 'UIPEthernetClass' renamed to 'UIPEthernet'; added IPAddress::toString() to support printing; added print support for debugging; bugs preventing offline build with GCC ARM toolchain fixed.

Who changed what in which revision?

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