Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
abcc_sys_adapt_par.h
00001 /******************************************************************************* 00002 ******************************************************************************** 00003 ** ** 00004 ** ABCC Driver version 4.01.01 (2015-12-14) ** 00005 ** ** 00006 ** Delivered with: ** 00007 ** ABP 7.16.01 (2015-10-14) ** 00008 ** */ 00009 /******************************************************************************* 00010 ******************************************************************************** 00011 ** COPYRIGHT NOTIFICATION (c) 2013 HMS Industrial Networks AB ** 00012 ** ** 00013 ** This code is the property of HMS Industrial Networks AB. ** 00014 ** The source code may not be reproduced, distributed, or used without ** 00015 ** permission. When used together with a product from HMS, this code can be ** 00016 ** modified, reproduced and distributed in binary form without any ** 00017 ** restrictions. ** 00018 ** ** 00019 ** THE CODE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. HMS DOES NOT ** 00020 ** WARRANT THAT THE FUNCTIONS OF THE CODE WILL MEET YOUR REQUIREMENTS, OR ** 00021 ** THAT THE OPERATION OF THE CODE WILL BE UNINTERRUPTED OR ERROR-FREE, OR ** 00022 ** THAT DEFECTS IN IT CAN BE CORRECTED. ** 00023 ******************************************************************************** 00024 ******************************************************************************** 00025 ** Target dependent interface for parallel 8 / 16 operation mode. 00026 ******************************************************************************** 00027 ******************************************************************************** 00028 ** Services: 00029 ** ABCC_SYS_ParallelRead() - Reads an amount of bytes from the 00030 ** ABCC 00031 ** ABCC_SYS_ParallelRead8() - Reads a byte from the ABCC 00032 ** ABCC_SYS_ParallelRead16() - Reads a word from the ABCC 00033 ** ABCC_SYS_ParallelWrite() - Writes an amount of bytes 00034 ** ABCC_SYS_ParallelWrite8() - Writes a byte to the ABCC 00035 ** ABCC_SYS_ParallelWrite16() - Writes a word to the ABCC 00036 ** ABCC_SYS_ParallelGetRdPdBuffer() - Get the address to the received read 00037 ** process data. 00038 ** ABCC_SYS_ParallelGetWrPdBuffer() - Get the address to the write process 00039 ** data. 00040 ******************************************************************************** 00041 ******************************************************************************** 00042 */ 00043 00044 #ifndef ABCC_SYS_ADAPT_PARI_ 00045 #define ABCC_SYS_ADAPT_PARI_ 00046 #include "abcc_drv_cfg.h" 00047 #include "abcc_td.h" 00048 #include "abp.h" 00049 00050 /******************************************************************************* 00051 ** Constants 00052 ******************************************************************************** 00053 */ 00054 00055 /******************************************************************************* 00056 ** Typedefs 00057 ******************************************************************************** 00058 */ 00059 00060 /******************************************************************************* 00061 ** Public Globals 00062 ******************************************************************************** 00063 */ 00064 00065 /******************************************************************************* 00066 ** Public Services 00067 ******************************************************************************** 00068 */ 00069 00070 /*------------------------------------------------------------------------------ 00071 ** Reads an amount of bytes from the ABCC memory. Implementation is not needed 00072 ** for a memory mapped system. 00073 ** This function/macro will be used by the driver when reading process data or 00074 ** message data from the ABCC memory. 00075 **------------------------------------------------------------------------------ 00076 ** Arguments: 00077 ** iMemOffset - Memory offset to start writing to. 00078 ** 8 bit char platforms : iMemOffset in octets 00079 ** 16 bit char platforms : iMemOffset in 16 bit words 00080 ** pxData - Pointer to the data to be written. 00081 ** iLength - The amount of data to write in octets. 00082 ** 00083 ** Returns: 00084 ** None 00085 **------------------------------------------------------------------------------ 00086 */ 00087 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00088 EXTFUNC void ABCC_SYS_ParallelRead( UINT16 iMemOffset, void* pxData, UINT16 iLength ); 00089 #endif 00090 00091 /*------------------------------------------------------------------------------ 00092 ** Reads a byte from the ABCC memory. 00093 **------------------------------------------------------------------------------ 00094 ** Arguments: 00095 ** iMemOffset - Offset from ABCC base address. 00096 ** 8 bit char platforms : iMemOffset in octets 00097 ** 16 bit char platforms : iMemOffset in 16 bit words 00098 ** 00099 ** Returns: 00100 ** Read UINT8s 00101 **------------------------------------------------------------------------------ 00102 */ 00103 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00104 EXTFUNC UINT8 ABCC_SYS_ParallelRead8( UINT16 iMemOffset ); 00105 #endif 00106 00107 /*------------------------------------------------------------------------------ 00108 ** Reads a word from the ABCC memory. 00109 **------------------------------------------------------------------------------ 00110 ** Arguments: 00111 ** iMemOffset - Offset from ABCC base address 00112 ** 8 bit char platforms : iMemOffset in octets 00113 ** 16 bit char platforms : iMemOffset in 16 bit words 00114 ** 00115 ** Returns: 00116 ** Read UINT16 00117 **------------------------------------------------------------------------------ 00118 */ 00119 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00120 EXTFUNC UINT16 ABCC_SYS_ParallelRead16( UINT16 iMemOffset ); 00121 #endif 00122 00123 /*------------------------------------------------------------------------------ 00124 ** Writes an amount of bytes to the ABCC memory 00125 ** This function will be used by the driver when writing process data or message 00126 ** data to the ABCC memory. 00127 **------------------------------------------------------------------------------ 00128 ** Arguments: 00129 ** iMemOffset - Memory offset to start writing to. 00130 ** 8 bit char platforms : iMemOffset in octets 00131 ** 16 bit char platforms : iMemOffset in 16 bit words 00132 ** pxData - Pointer to the data to be written. 00133 ** iLength - The amount of data to write in octets. 00134 ** 00135 ** Returns: 00136 ** None 00137 **------------------------------------------------------------------------------ 00138 */ 00139 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00140 EXTFUNC void ABCC_SYS_ParallelWrite( UINT16 iMemOffset, 00141 void* pxData, 00142 UINT16 iLength ); 00143 #endif 00144 00145 /*------------------------------------------------------------------------------ 00146 ** Writes a byte to the ABCC memory. 00147 **------------------------------------------------------------------------------ 00148 ** Arguments: 00149 ** iMemOffset - Offset from ABCC base address. 00150 ** 8 bit char platforms : iMemOffset in octets 00151 ** 16 bit char platforms : iMemOffset in 16 bit words 00152 ** pbData - Data to be written to ABCC 00153 ** 00154 ** Returns: 00155 ** None 00156 **------------------------------------------------------------------------------ 00157 */ 00158 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00159 EXTFUNC void ABCC_SYS_ParallelWrite8( UINT16 iMemOffset, UINT8 pbData ); 00160 #endif 00161 00162 /*------------------------------------------------------------------------------ 00163 ** Writes a word to the ABCC memory. 00164 **------------------------------------------------------------------------------ 00165 ** Arguments: 00166 ** iMemOffset - Offset from ABCC base address. 00167 ** 8 bit char platforms : iMemOffset in octets 00168 ** 16 bit char platforms : iMemOffset in 16 bit words 00169 ** iData - Data to be written to ABCC 00170 ** 00171 ** Returns: 00172 ** None 00173 **------------------------------------------------------------------------------ 00174 */ 00175 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00176 EXTFUNC void ABCC_SYS_ParallelWrite16( UINT16 iMemOffset, UINT16 iData ); 00177 #endif 00178 00179 /*------------------------------------------------------------------------------ 00180 ** Get the address to the received read process data. 00181 ** For a non memory mapped system the system adaption layer need to provide a 00182 ** buffer where the read process data can be stored. 00183 **------------------------------------------------------------------------------ 00184 ** Argument: 00185 ** None 00186 ** 00187 ** Returns: 00188 ** Address to RdPdBuffer. 00189 ** 00190 **------------------------------------------------------------------------------ 00191 */ 00192 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00193 EXTFUNC void* ABCC_SYS_ParallelGetRdPdBuffer( void ); 00194 #endif 00195 00196 /*------------------------------------------------------------------------------ 00197 ** Get the address to store the write process data. 00198 ** For a non memory mapped system the system adaption layer need to provide a 00199 ** buffer where the write process data can be stored. 00200 ** No implementation is needed for a memory mapped system since the macro 00201 ** provides the information. 00202 **------------------------------------------------------------------------------ 00203 ** Argument: 00204 ** None 00205 ** 00206 ** Returns: 00207 ** Address to WrPdBuffer 00208 ** 00209 **------------------------------------------------------------------------------ 00210 */ 00211 #if( !ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00212 EXTFUNC void* ABCC_SYS_ParallelGetWrPdBuffer( void ); 00213 #endif 00214 00215 #endif /* inclusion lock */
Generated on Tue Jul 12 2022 15:51:56 by
