2 * Amazon FreeRTOS Platform V1.0.0
\r
3 * Copyright (C) 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
\r
5 * Permission is hereby granted, free of charge, to any person obtaining a copy of
\r
6 * this software and associated documentation files (the "Software"), to deal in
\r
7 * the Software without restriction, including without limitation the rights to
\r
8 * use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
\r
9 * the Software, and to permit persons to whom the Software is furnished to do so,
\r
10 * subject to the following conditions:
\r
12 * The above copyright notice and this permission notice shall be included in all
\r
13 * copies or substantial portions of the Software.
\r
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
\r
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
\r
17 * FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
\r
18 * COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
\r
19 * IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
\r
20 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
\r
22 * http://aws.amazon.com/freertos
\r
23 * http://www.FreeRTOS.org
\r
27 * @file iot_platform_types_posix.h
\r
28 * @brief Definitions of platform layer types on POSIX systems.
\r
31 #ifndef _IOT_PLATFORM_TYPES_AFR_H_
\r
32 #define _IOT_PLATFORM_TYPES_AFR_H_
\r
36 typedef struct iot_mutex_internal
\r
38 StaticSemaphore_t xMutex; /**< FreeRTOS mutex. */
\r
39 BaseType_t recursive; /**< Type; used for indicating if this is reentrant or normal. */
\r
40 } iot_mutex_internal_t;
\r
43 * @brief The native mutex type on AFR systems.
\r
45 typedef iot_mutex_internal_t _IotSystemMutex_t;
\r
47 typedef struct iot_sem_internal
\r
49 StaticSemaphore_t xSemaphore; /**< FreeRTOS semaphore. */
\r
50 } iot_sem_internal_t;
\r
53 * @brief The native semaphore type on AFR systems.
\r
55 typedef iot_sem_internal_t _IotSystemSemaphore_t;
\r
58 * @brief Holds information about an active detached thread so that we can
\r
59 * delete the FreeRTOS task when it completes
\r
61 typedef struct threadInfo
\r
63 void * pArgument; /**< @brief Argument to `threadRoutine`. */
\r
64 void ( *threadRoutine )( void * );/**< @brief Thread function to run. */
\r
68 * @brief Holds information about an active timer.
\r
70 typedef struct timerInfo
\r
72 TimerHandle_t timer; /**< @brief Underlying timer. */
\r
73 void ( *threadRoutine )( void * ); /**< @brief Thread function to run on timer expiration. */
\r
74 void * pArgument; /**< @brief First argument to threadRoutine. */
\r
75 StaticTimer_t xTimerBuffer; /**< Memory that holds the FreeRTOS timer. */
\r
76 TickType_t xTimerPeriod; /**< Period of this timer. */
\r
80 * @brief Represents an #IotTimer_t on AFR systems.
\r
82 typedef timerInfo_t _IotSystemTimer_t;
\r
84 #endif /* ifndef _IOT_PLATFORM_TYPES_POSIX_H_ */
\r