Port of the FreeModbus Libary for mbed, copied from https://developer.mbed.org/users/cam/code/Modbus/ and upgraded to mbed 5
Dependents: NUCLEO-F401-printf
port.h@1:3e360cf155b6, 2017-08-16 (annotated)
- Committer:
- Rajit Singh
- Date:
- Wed Aug 16 17:31:26 2017 +0100
- Revision:
- 1:3e360cf155b6
- Parent:
- 0:9db3bed8fffd
Remove main.cpp
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| Rajit Singh |
0:9db3bed8fffd | 1 | /* |
| Rajit Singh |
0:9db3bed8fffd | 2 | * FreeModbus Libary: BARE Port |
| Rajit Singh |
0:9db3bed8fffd | 3 | * Copyright (C) 2006 Christian Walter <wolti@sil.at> |
| Rajit Singh |
0:9db3bed8fffd | 4 | * |
| Rajit Singh |
0:9db3bed8fffd | 5 | * This library is free software; you can redistribute it and/or |
| Rajit Singh |
0:9db3bed8fffd | 6 | * modify it under the terms of the GNU Lesser General Public |
| Rajit Singh |
0:9db3bed8fffd | 7 | * License as published by the Free Software Foundation; either |
| Rajit Singh |
0:9db3bed8fffd | 8 | * version 2.1 of the License, or (at your option) any later version. |
| Rajit Singh |
0:9db3bed8fffd | 9 | * |
| Rajit Singh |
0:9db3bed8fffd | 10 | * This library is distributed in the hope that it will be useful, |
| Rajit Singh |
0:9db3bed8fffd | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| Rajit Singh |
0:9db3bed8fffd | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| Rajit Singh |
0:9db3bed8fffd | 13 | * Lesser General Public License for more details. |
| Rajit Singh |
0:9db3bed8fffd | 14 | * |
| Rajit Singh |
0:9db3bed8fffd | 15 | * You should have received a copy of the GNU Lesser General Public |
| Rajit Singh |
0:9db3bed8fffd | 16 | * License along with this library; if not, write to the Free Software |
| Rajit Singh |
0:9db3bed8fffd | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
| Rajit Singh |
0:9db3bed8fffd | 18 | * |
| Rajit Singh |
0:9db3bed8fffd | 19 | * File: $Id: port.h,v 1.1 2006/08/22 21:35:13 wolti Exp $ |
| Rajit Singh |
0:9db3bed8fffd | 20 | */ |
| Rajit Singh |
0:9db3bed8fffd | 21 | |
| Rajit Singh |
0:9db3bed8fffd | 22 | #ifndef _PORT_H |
| Rajit Singh |
0:9db3bed8fffd | 23 | #define _PORT_H |
| Rajit Singh |
0:9db3bed8fffd | 24 | |
| Rajit Singh |
0:9db3bed8fffd | 25 | #include <assert.h> |
| Rajit Singh |
0:9db3bed8fffd | 26 | #include <inttypes.h> |
| Rajit Singh |
0:9db3bed8fffd | 27 | |
| Rajit Singh |
0:9db3bed8fffd | 28 | #define INLINE //inline |
| Rajit Singh |
0:9db3bed8fffd | 29 | #define PR_BEGIN_EXTERN_C //extern "C" { |
| Rajit Singh |
0:9db3bed8fffd | 30 | #define PR_END_EXTERN_C //} |
| Rajit Singh |
0:9db3bed8fffd | 31 | |
| Rajit Singh |
0:9db3bed8fffd | 32 | #define ENTER_CRITICAL_SECTION( ) |
| Rajit Singh |
0:9db3bed8fffd | 33 | #define EXIT_CRITICAL_SECTION( ) |
| Rajit Singh |
0:9db3bed8fffd | 34 | |
| Rajit Singh |
0:9db3bed8fffd | 35 | typedef uint8_t BOOL; |
| Rajit Singh |
0:9db3bed8fffd | 36 | |
| Rajit Singh |
0:9db3bed8fffd | 37 | typedef unsigned char UCHAR; |
| Rajit Singh |
0:9db3bed8fffd | 38 | typedef char CHAR; |
| Rajit Singh |
0:9db3bed8fffd | 39 | |
| Rajit Singh |
0:9db3bed8fffd | 40 | typedef uint16_t USHORT; |
| Rajit Singh |
0:9db3bed8fffd | 41 | typedef int16_t SHORT; |
| Rajit Singh |
0:9db3bed8fffd | 42 | |
| Rajit Singh |
0:9db3bed8fffd | 43 | typedef uint32_t ULONG; |
| Rajit Singh |
0:9db3bed8fffd | 44 | typedef int32_t LONG; |
| Rajit Singh |
0:9db3bed8fffd | 45 | |
| Rajit Singh |
0:9db3bed8fffd | 46 | #ifndef TRUE |
| Rajit Singh |
0:9db3bed8fffd | 47 | #define TRUE 1 |
| Rajit Singh |
0:9db3bed8fffd | 48 | #endif |
| Rajit Singh |
0:9db3bed8fffd | 49 | |
| Rajit Singh |
0:9db3bed8fffd | 50 | #ifndef FALSE |
| Rajit Singh |
0:9db3bed8fffd | 51 | #define FALSE 0 |
| Rajit Singh |
0:9db3bed8fffd | 52 | #endif |
| Rajit Singh |
0:9db3bed8fffd | 53 | |
| Rajit Singh |
0:9db3bed8fffd | 54 | #endif |