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