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