1 /* ----> DO NOT REMOVE THE FOLLOWING NOTICE <----
\r
3 Copyright (c) 2014-2015 Datalight, Inc.
\r
4 All Rights Reserved Worldwide.
\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
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
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
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
31 #include <redostypes.h>
\r
34 /** @brief Type of access requested when opening a block device.
\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
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
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
52 /* Non-standard API: for host machines only.
\r
54 REDSTATUS RedOsBDevConfig(uint8_t bVolNum, const char *pszBDevSpec);
\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
63 #if (REDCONF_TASK_COUNT > 1U) && (REDCONF_API_POSIX == 1)
\r
64 uint32_t RedOsTaskId(void);
\r
67 REDSTATUS RedOsClockInit(void);
\r
68 REDSTATUS RedOsClockUninit(void);
\r
69 uint32_t RedOsClockGetTime(void);
\r
71 REDSTATUS RedOsTimestampInit(void);
\r
72 REDSTATUS RedOsTimestampUninit(void);
\r
73 REDTIMESTAMP RedOsTimestamp(void);
\r
74 uint64_t RedOsTimePassed(REDTIMESTAMP tsSince);
\r
76 #if REDCONF_OUTPUT == 1
\r
77 void RedOsOutputString(const char *pszString);
\r
80 #if REDCONF_ASSERTS == 1
\r
81 void RedOsAssertFail(const char *pszFileName, uint32_t ulLineNum);
\r