TI's mqtt.
platform/cc3200_platform.cpp@1:673880ad39ad, 2015-06-06 (annotated)
- Committer:
- dflet
- Date:
- Sat Jun 06 13:37:53 2015 +0000
- Revision:
- 1:673880ad39ad
- Parent:
- 0:698866e331b2
TI's mqtt
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
dflet | 0:698866e331b2 | 1 | /****************************************************************************** |
dflet | 0:698866e331b2 | 2 | * |
dflet | 0:698866e331b2 | 3 | * Copyright (C) 2014 Texas Instruments Incorporated |
dflet | 0:698866e331b2 | 4 | * |
dflet | 0:698866e331b2 | 5 | * All rights reserved. Property of Texas Instruments Incorporated. |
dflet | 0:698866e331b2 | 6 | * Restricted rights to use, duplicate or disclose this code are |
dflet | 0:698866e331b2 | 7 | * granted through contract. |
dflet | 0:698866e331b2 | 8 | * |
dflet | 0:698866e331b2 | 9 | * The program may not be used without the written permission of |
dflet | 0:698866e331b2 | 10 | * Texas Instruments Incorporated or against the terms and conditions |
dflet | 0:698866e331b2 | 11 | * stipulated in the agreement under which this program has been supplied, |
dflet | 0:698866e331b2 | 12 | * and under no circumstances can it be used with non-TI connectivity device. |
dflet | 0:698866e331b2 | 13 | * |
dflet | 0:698866e331b2 | 14 | ******************************************************************************/ |
dflet | 0:698866e331b2 | 15 | |
dflet | 0:698866e331b2 | 16 | #include "cc3200_platform.h" |
dflet | 0:698866e331b2 | 17 | |
dflet | 0:698866e331b2 | 18 | |
dflet | 0:698866e331b2 | 19 | Timer t; |
dflet | 0:698866e331b2 | 20 | |
dflet | 0:698866e331b2 | 21 | namespace mbed_mqtt { |
dflet | 0:698866e331b2 | 22 | |
dflet | 0:698866e331b2 | 23 | void platform_timer_init() |
dflet | 0:698866e331b2 | 24 | { |
dflet | 0:698866e331b2 | 25 | t.start(); |
dflet | 0:698866e331b2 | 26 | } |
dflet | 0:698866e331b2 | 27 | |
dflet | 0:698866e331b2 | 28 | uint32_t platform_get_time_in_secs() |
dflet | 0:698866e331b2 | 29 | { |
dflet | 0:698866e331b2 | 30 | uint32_t Secs = 0; |
dflet | 0:698866e331b2 | 31 | // uint16_t Msec = 0; |
dflet | 0:698866e331b2 | 32 | |
dflet | 0:698866e331b2 | 33 | t.stop(); |
dflet | 0:698866e331b2 | 34 | Secs = t.read(); |
dflet | 0:698866e331b2 | 35 | // Msec = t.read_ms(); |
dflet | 0:698866e331b2 | 36 | t.reset(); |
dflet | 0:698866e331b2 | 37 | t.start(); |
dflet | 0:698866e331b2 | 38 | |
dflet | 0:698866e331b2 | 39 | return (Secs); |
dflet | 0:698866e331b2 | 40 | } |
dflet | 0:698866e331b2 | 41 | |
dflet | 0:698866e331b2 | 42 | }//namespace mbed_mqtt |