]> begriffs open source - freertos/blob - FreeRTOS-Plus/Source/Reliance-Edge/include/redosserv.h
Minor modification to the WIn32 simple TCP/IP stack example only.
[freertos] / FreeRTOS-Plus / Source / Reliance-Edge / include / redosserv.h
1 /*             ----> DO NOT REMOVE THE FOLLOWING NOTICE <----\r
2 \r
3                    Copyright (c) 2014-2015 Datalight, Inc.\r
4                        All Rights Reserved Worldwide.\r
5 \r
6     This program is free software; you can redistribute it and/or modify\r
7     it under the terms of the GNU General Public License as published by\r
8     the Free Software Foundation; use version 2 of the License.\r
9 \r
10     This program is distributed in the hope that it will be useful,\r
11     but "AS-IS," WITHOUT ANY WARRANTY; without even the implied warranty\r
12     of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
13     GNU General Public License for more details.\r
14 \r
15     You should have received a copy of the GNU General Public License along\r
16     with this program; if not, write to the Free Software Foundation, Inc.,\r
17     51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\r
18 */\r
19 /*  Businesses and individuals that for commercial or other reasons cannot\r
20     comply with the terms of the GPLv2 license may obtain a commercial license\r
21     before incorporating Reliance Edge into proprietary software for\r
22     distribution in any form.  Visit http://www.datalight.com/reliance-edge for\r
23     more information.\r
24 */\r
25 /** @file\r
26 */\r
27 #ifndef REDOSSERV_H\r
28 #define REDOSSERV_H\r
29 \r
30 \r
31 #include <redostypes.h>\r
32 \r
33 \r
34 /** @brief Type of access requested when opening a block device.\r
35 */\r
36 typedef enum\r
37 {\r
38     BDEV_O_RDONLY,  /**< Open block device for read access. */\r
39     BDEV_O_WRONLY,  /**< Open block device for write access. */\r
40     BDEV_O_RDWR     /**< Open block device for read and write access. */\r
41 } BDEVOPENMODE;\r
42 \r
43 REDSTATUS RedOsBDevOpen(uint8_t bVolNum, BDEVOPENMODE mode);\r
44 REDSTATUS RedOsBDevClose(uint8_t bVolNum);\r
45 REDSTATUS RedOsBDevRead(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, void *pBuffer);\r
46 \r
47 #if REDCONF_READ_ONLY == 0\r
48 REDSTATUS RedOsBDevWrite(uint8_t bVolNum, uint64_t ullSectorStart, uint32_t ulSectorCount, const void *pBuffer);\r
49 REDSTATUS RedOsBDevFlush(uint8_t bVolNum);\r
50 #endif\r
51 \r
52 /*  Non-standard API: for host machines only.\r
53 */\r
54 REDSTATUS RedOsBDevConfig(uint8_t bVolNum, const char *pszBDevSpec);\r
55 \r
56 \r
57 #if REDCONF_TASK_COUNT > 1U\r
58 REDSTATUS RedOsMutexInit(void);\r
59 REDSTATUS RedOsMutexUninit(void);\r
60 void RedOsMutexAcquire(void);\r
61 void RedOsMutexRelease(void);\r
62 #endif\r
63 #if (REDCONF_TASK_COUNT > 1U) && (REDCONF_API_POSIX == 1)\r
64 uint32_t RedOsTaskId(void);\r
65 #endif\r
66 \r
67 REDSTATUS RedOsClockInit(void);\r
68 REDSTATUS RedOsClockUninit(void);\r
69 uint32_t RedOsClockGetTime(void);\r
70 \r
71 REDSTATUS RedOsTimestampInit(void);\r
72 REDSTATUS RedOsTimestampUninit(void);\r
73 REDTIMESTAMP RedOsTimestamp(void);\r
74 uint64_t RedOsTimePassed(REDTIMESTAMP tsSince);\r
75 \r
76 #if REDCONF_OUTPUT == 1\r
77 void RedOsOutputString(const char *pszString);\r
78 #endif\r
79 \r
80 #if REDCONF_ASSERTS == 1\r
81 void RedOsAssertFail(const char *pszFileName, uint32_t ulLineNum);\r
82 #endif\r
83 \r
84 \r
85 #endif\r
86 \r