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_drv_if.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 ** Defines the generic driver interface implemented by each specific driver. 00026 ******************************************************************************** 00027 ******************************************************************************** 00028 ** Driver services: 00029 ** pnABCC_DrvInit() - Initialize driver privates and 00030 ** states to default values. 00031 ** pnABCC_DrvISR() - Calls in the interrupt context to 00032 ** acknowledge received 00033 ** interrupts. 00034 ** pnABCC_DrvRunDriverTx() - Drives the internal send process 00035 ** if applicable 00036 ** pnABCC_DrvRunDriverRx() - Drives the internal receive 00037 ** process if applicable 00038 ** pnABCC_DrvWriteMessage() - Writes a message. 00039 ** pnABCC_DrvWriteProcessData() - Writes current process data. 00040 ** pnABCC_DrvISReadyForWriteMessage() - Checks if the driver is ready 00041 ** to send a new write message. 00042 ** pnABCC_DrvISReadyForCmd() - Checks if the Anybus is ready to 00043 ** receive a new command message. 00044 ** pnABCC_DrvSetNbrOfCmds() - Sets the number of simultaneous 00045 ** commands that is supported by 00046 ** the application. 00047 ** pnABCC_DrvSetAppStatus() - Sets the current application 00048 ** status. 00049 ** pnABCC_DrvSetPdSize() - Sets the current process data 00050 ** size. 00051 ** pnABCC_DrvSetMsgReceiverBuffer() - Sets the message receiver buffer. 00052 ** pnABCC_DrvSetIntMask() - Set interrupt mask 00053 ** pnABCC_DrvGetWrPdBuffer() - Get wrpd buffer 00054 ** pnABCC_DrvGetModCap() - Read module capability 00055 ** pnABCC_DrvGetLedStatus() - Read led status 00056 ** pnABCC_DrvGetIntStatus() - Get current interrupt status 00057 ** pnABCC_DrvGetAnybusState() - Get current Anybus state 00058 ** pnABCC_DrvReadProcessData() - Get read process data if any. 00059 ** pnABCC_DrvReadMessage() - Get read message if any. 00060 ** pnABCC_DrvIsSuperviced() - Is the network supervised 00061 ******************************************************************************** 00062 ******************************************************************************** 00063 */ 00064 00065 #ifndef PHY_DRV_IF_H_ 00066 #define PHY_DRV_IF_H_ 00067 00068 #include "abcc_drv_cfg.h" 00069 #include "abcc_td.h" 00070 #include "abcc_debug_err.h" 00071 #include "abp.h" 00072 00073 /******************************************************************************* 00074 ** Constants 00075 ******************************************************************************** 00076 */ 00077 00078 /******************************************************************************* 00079 ** Typedefs 00080 ******************************************************************************** 00081 */ 00082 00083 /******************************************************************************* 00084 ** Public Globals 00085 ******************************************************************************** 00086 */ 00087 00088 /******************************************************************************* 00089 ** Public Services 00090 ******************************************************************************** 00091 */ 00092 00093 /*------------------------------------------------------------------------------ 00094 ** Reads an amount of bytes from the ABCC memory. 00095 ** This function/macro will be used by the driver when reading process data or 00096 ** message data from the ABCC memory. 00097 ** See also the ABCC_SYS_READ_RDPD macro description below. 00098 **------------------------------------------------------------------------------ 00099 ** Arguments: 00100 ** iMemOffset - Memory offset to start writing to. 00101 ** 8 bit char platforms : iMemOffset in octets 00102 ** 16 bit char platforms : iMemOffset in 16 bit words 00103 ** pxData - Pointer to the data to be written. 00104 ** iLength - The amount of data to write in octets. 00105 ** 00106 ** Returns: 00107 ** None 00108 **------------------------------------------------------------------------------ 00109 */ 00110 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00111 #define ABCC_DrvParallelRead( iMemOffset, pxData, iLength ) \ 00112 ABCC_PORT_MemCpy( (pxData), (void*)( ABCC_CFG_PARALLEL_BASE_ADR + (iMemOffset) ), (iLength) ) 00113 #else 00114 #define ABCC_DrvParallelRead( iMemOffset, pxData, iLength ) \ 00115 ABCC_SYS_ParallelRead( iMemOffset, pxData, iLength ) 00116 #endif 00117 00118 /*------------------------------------------------------------------------------ 00119 ** Reads a byte from the ABCC memory. 00120 **------------------------------------------------------------------------------ 00121 ** Arguments: 00122 ** iMemOffset - Offset from ABCC base address. 00123 ** 8 bit char platforms : iMemOffset in octets 00124 ** 16 bit char platforms : iMemOffset in 16 bit words 00125 ** 00126 ** Returns: 00127 ** Read UINT8 00128 **------------------------------------------------------------------------------ 00129 */ 00130 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00131 #define ABCC_DrvRead8( iMemOffset ) \ 00132 *(volatile UINT8*)( ABCC_CFG_PARALLEL_BASE_ADR + ( iMemOffset ) ) 00133 #define ABCC_DrvRead16( iMemOffset ) \ 00134 *(volatile UINT16*)( ABCC_CFG_PARALLEL_BASE_ADR + ( iMemOffset ) ) 00135 #else 00136 #define ABCC_DrvRead8( iMemOffset ) ABCC_SYS_ParallelRead8( iMemOffset ) 00137 #define ABCC_DrvRead16( iMemOffset ) ABCC_SYS_ParallelRead16( iMemOffset ) 00138 #endif 00139 00140 /*------------------------------------------------------------------------------ 00141 ** Writes a word to the ABCC memory. 00142 ** In case of a memory mapped system this function does not need not be 00143 ** implemented. See ABCC_SYS_WRITE16 macro description below. 00144 **------------------------------------------------------------------------------ 00145 ** Arguments: 00146 ** iMemOffset - Offset from ABCC base address. 00147 ** 8 bit char platforms : iMemOffset in octets 00148 ** 16 bit char platforms : iMemOffset in 16 bit words 00149 ** iData - Data to be written to ABCC 00150 ** 00151 ** Returns: 00152 ** None 00153 **------------------------------------------------------------------------------ 00154 */ 00155 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00156 #define ABCC_DrvParallelWrite( iMemOffset, pxData, iLength ) \ 00157 ABCC_PORT_MemCpy( (void*)( ABCC_CFG_PARALLEL_BASE_ADR + (iMemOffset) ), (pxData), (iLength) ) 00158 #else 00159 #define ABCC_DrvParallelWrite( iMemOffset, pxData, iLength ) \ 00160 ABCC_SYS_ParallelWrite( iMemOffset, pxData, iLength ) 00161 #endif 00162 00163 /*------------------------------------------------------------------------------ 00164 ** The driver will use the ABCC_SYS_WRITE8 and ABCC_SYS_WRITE16 macros to 00165 ** access the ABCC registers. In case of a memory mapped system, 00166 ** MEMORY_MAPPED_ACCESS is defined an direct memory access will be done 00167 ** using ABCC_CFG_PARALLEL_BASE_ADR to calculate the absolute address. In case 00168 ** of a non memory mapped system the ABCC_SYS_ParallelWrite8/16 will be called. 00169 **------------------------------------------------------------------------------ 00170 ** Arguments: 00171 ** iMemOffset - Offset from ABCC base address. 00172 ** 8 bit char platforms : iMemOffset in octets 00173 ** 16 bit char platforms : iMemOffset in 16 bit words 00174 ** pbData - Data to be written to ABCC 00175 ** 00176 ** Returns: 00177 ** None 00178 ** 00179 **------------------------------------------------------------------------------ 00180 */ 00181 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00182 #define ABCC_DrvWrite8( iMemOffset, pbData ) \ 00183 *(volatile UINT8*)( ABCC_CFG_PARALLEL_BASE_ADR + ( iMemOffset ) ) = pbData 00184 #define ABCC_DrvWrite16( iMemOffset, pbData ) \ 00185 *(volatile UINT16*)( ABCC_CFG_PARALLEL_BASE_ADR + ( iMemOffset ) ) = pbData 00186 #else 00187 #define ABCC_DrvWrite8( iMemOffset, pbData ) \ 00188 ABCC_SYS_ParallelWrite8( iMemOffset, pbData ) 00189 #define ABCC_DrvWrite16( iMemOffset, pbData ) \ 00190 ABCC_SYS_ParallelWrite16( iMemOffset, pbData ) 00191 #endif 00192 00193 /*------------------------------------------------------------------------------ 00194 ** Get the address to the received read process data. 00195 ** For a non memory mapped system the system adaption layer need to provide a 00196 ** buffer where the read process data can be stored. 00197 ** No implementation is needed for a memory mapped system since the macro 00198 ** provides the information. 00199 **------------------------------------------------------------------------------ 00200 ** Argument: 00201 ** None 00202 ** 00203 ** Returns: 00204 ** Address to RdPdBuffer. 00205 ** 00206 **------------------------------------------------------------------------------ 00207 */ 00208 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00209 #if( ABCC_CFG_DRV_PARALLEL_30 ) 00210 #define ABCC_DrvParallelGetRdPdBuffer() \ 00211 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ABP_RDPDM_ADR_OFFSET ) 00212 #else 00213 #ifdef ABCC_SYS_16_BIT_CHAR 00214 #define ABCC_DrvParallelGetRdPdBuffer() \ 00215 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ( ABP_RDPD_ADR_OFFSET >> 1 ) ) 00216 #else 00217 #define ABCC_DrvParallelGetRdPdBuffer() \ 00218 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ABP_RDPD_ADR_OFFSET ) 00219 #endif 00220 #endif 00221 #else 00222 #define ABCC_DrvParallelGetRdPdBuffer() \ 00223 ABCC_SYS_ParallelGetRdPdBuffer() 00224 #endif 00225 00226 /*------------------------------------------------------------------------------ 00227 ** This macro will be used by the driver to read process data. In case of a 00228 ** memory mapped system the macro will be empty since the buffer already 00229 ** contains the received data. ( See ABCC_SYS_ParallelGetRdPdBuffer ). 00230 ** For a non memory mapped system ABCC_SYS_ParallelRead will be called with the 00231 ** buffer received from ABCC_SYS_ParallelGetRdPdBuffer() 00232 ** The buffer will be valid until the next read process data read is done. 00233 ** For ABCC30 ( ABCC_CFG_DRV_PARALLEL_30 defined ) the legacy address offset is 00234 ** used. 00235 **------------------------------------------------------------------------------ 00236 ** Arguments: 00237 ** buffer: Pointer where to store received process data 00238 ** size: Size of read process data in octets. 00239 ** Returns: 00240 **------------------------------------------------------------------------------ 00241 */ 00242 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00243 #define ABCC_DrvReadRdPd( buffer, size ) (void)(buffer); \ 00244 (void)(size) 00245 #else 00246 #if( ABCC_CFG_DRV_PARALLEL_30 ) 00247 #define ABCC_DrvReadRdPd( buffer, size ) \ 00248 ABCC_SYS_ParallelRead( ABP_RDPDM_ADR_OFFSET, buffer, size ) 00249 #else 00250 #define ABCC_DrvReadRdPd( buffer, size ) \ 00251 ABCC_SYS_ParallelRead( ABP_RDPD_ADR_OFFSET, buffer, size ) 00252 #endif 00253 #endif 00254 00255 /*------------------------------------------------------------------------------ 00256 ** Get the address to store the write process data. 00257 ** For a non memory mapped system the system adaption layer need to provide a 00258 ** buffer where the write process data can be stored. 00259 ** No implementation is needed for a memory mapped system since the macro 00260 ** provides the information. 00261 **------------------------------------------------------------------------------ 00262 ** Argument: 00263 ** None 00264 ** 00265 ** Returns: 00266 ** Address to WrPdBuffer 00267 ** 00268 **------------------------------------------------------------------------------ 00269 */ 00270 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00271 #if( ABCC_CFG_DRV_PARALLEL_30 ) 00272 #define ABCC_DrvParallelGetWrPdBuffer() \ 00273 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ABP_WRPDM_ADR_OFFSET ) 00274 #else 00275 #ifdef ABCC_SYS_16_BIT_CHAR 00276 #define ABCC_DrvParallelGetWrPdBuffer() \ 00277 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ( ABP_WRPD_ADR_OFFSET >> 1 ) ) 00278 #else 00279 #define ABCC_DrvParallelGetWrPdBuffer() \ 00280 (void*)( ABCC_CFG_PARALLEL_BASE_ADR + ABP_WRPD_ADR_OFFSET ) 00281 #endif 00282 #endif 00283 #else 00284 #define ABCC_DrvParallelGetWrPdBuffer() ABCC_SYS_ParallelGetWrPdBuffer() 00285 #endif 00286 00287 /*------------------------------------------------------------------------------ 00288 ** This macro will be used by the driver to write process data. In case of a 00289 ** memory mapped system the macro will be empty since the buffer already 00290 ** contains the written data. ( See ABCC_SYS_ParallelGetWrPdBuffer ). 00291 ** For a non memory mapped system ABCC_SYS_ParallelWrite will be called with the 00292 ** buffer received from ABCC_SYS_ParallelGetWrPdBuffer(). 00293 ** When function has returned new process data can be written to the buffer. 00294 ** For ABCC30 ( ABCC_CFG_DRV_PARALLEL_30 defined ) the legacy address offset is 00295 ** used. 00296 **------------------------------------------------------------------------------ 00297 ** Arguments: 00298 ** buffer - Pointer to write process data 00299 ** size - Size of write process data in octets. 00300 ** 00301 ** Returns: 00302 ** None 00303 **------------------------------------------------------------------------------ 00304 */ 00305 #if( ABCC_CFG_MEMORY_MAPPED_ACCESS ) 00306 #define ABCC_DrvWriteWrPd( pxBuffer, iSize ) 00307 #else 00308 #if( ABCC_CFG_DRV_PARALLEL_30 ) 00309 #define ABCC_DrvWriteWrPd( pxBuffer, iSize ) \ 00310 ABCC_SYS_ParallelWrite( ABP_WRPDM_ADR_OFFSET, pxBuffer, iSize ) 00311 #else 00312 #define ABCC_DrvWriteWrPd( pxBuffer, iSize ) \ 00313 ABCC_SYS_ParallelWrite( ABP_WRPD_ADR_OFFSET, pxBuffer, iSize ) 00314 #endif 00315 #endif 00316 00317 /*------------------------------------------------------------------------------ 00318 ** Initializes the driver to default values. 00319 ** Must be called before the driver is used. 00320 **------------------------------------------------------------------------------ 00321 ** Arguments: 00322 ** None. 00323 ** 00324 ** Returns: 00325 ** None. 00326 **------------------------------------------------------------------------------ 00327 */ 00328 EXTFUNC void ( *pnABCC_DrvInit )( UINT8 bOpmode ); 00329 00330 /*------------------------------------------------------------------------------ 00331 ** Calls in the interrupt context to acknowledge received interrupts.The ISR 00332 ** routine will clear all pending interrupts. 00333 **------------------------------------------------------------------------------ 00334 ** Arguments: 00335 ** None. 00336 ** 00337 ** Returns: 00338 ** Acknowledged interrupts. 00339 **------------------------------------------------------------------------------ 00340 */ 00341 EXTFUNC UINT16 ( *pnABCC_DrvISR )( void ); 00342 00343 /*------------------------------------------------------------------------------ 00344 ** Drives the internal send process. 00345 **------------------------------------------------------------------------------ 00346 ** Arguments: 00347 ** None. 00348 ** 00349 ** Returns: 00350 ** None. 00351 **------------------------------------------------------------------------------ 00352 */ 00353 EXTFUNC void ( *pnABCC_DrvRunDriverTx )( void ); 00354 00355 /*------------------------------------------------------------------------------ 00356 ** Drives the internal receive process. 00357 **------------------------------------------------------------------------------ 00358 ** Arguments: 00359 ** None. 00360 ** 00361 ** Returns: 00362 ** Pointer to successfully sent write message. 00363 **------------------------------------------------------------------------------ 00364 */ 00365 EXTFUNC ABP_MsgType* ( *pnABCC_DrvRunDriverRx )( void ); 00366 00367 /*------------------------------------------------------------------------------ 00368 ** Writes a message to the driver. 00369 **------------------------------------------------------------------------------ 00370 ** Arguments: 00371 ** psWriteMsg - Pointer to message. 00372 ** 00373 ** Returns: 00374 ** True - Message was successfully written and can be deallocated 00375 ** immediately. 00376 ** False - Message was not yet written and cannot be deallocated. 00377 ** The psWriteMsg pointer is owned by the driver until the 00378 ** message is written and the pointer is returned in the 00379 ** driver execution response. 00380 **------------------------------------------------------------------------------ 00381 */ 00382 EXTFUNC BOOL ( *pnABCC_DrvWriteMessage) ( ABP_MsgType* psWriteMsg ); 00383 00384 /*------------------------------------------------------------------------------ 00385 ** Writes current process data. 00386 ** The data is copied before returning from the method. 00387 **------------------------------------------------------------------------------ 00388 ** Arguments: 00389 ** pbProcessData - Pointer to process data to be sent. 00390 ** 00391 ** Returns: 00392 ** None 00393 **------------------------------------------------------------------------------ 00394 */ 00395 EXTFUNC void ( *pnABCC_DrvWriteProcessData )( void* pbProcessData ); 00396 00397 /*------------------------------------------------------------------------------ 00398 ** Checks if the driver is in the correct state for writing process data to the 00399 ** anybus 00400 **------------------------------------------------------------------------------ 00401 ** Arguments: 00402 ** None 00403 ** 00404 ** Returns: 00405 ** True - Driver is in correct state to send WrPd 00406 ** False: - Driver is not in correct state to send Wrpd 00407 **------------------------------------------------------------------------------ 00408 */ 00409 EXTFUNC BOOL ( *pnABCC_DrvISReadyForWrPd )( void ); 00410 00411 /*------------------------------------------------------------------------------ 00412 ** Checks if the driver is ready to send a new write message. 00413 **------------------------------------------------------------------------------ 00414 ** Arguments: 00415 ** None 00416 ** 00417 ** Returns: 00418 ** True - Driver is ready to send a new write message. 00419 ** False - Driver is not ready to send a new write message. 00420 **------------------------------------------------------------------------------ 00421 */ 00422 EXTFUNC BOOL ( *pnABCC_DrvISReadyForWriteMessage )( void ); 00423 00424 /*------------------------------------------------------------------------------ 00425 ** The host application checks if the Anybus is ready to receive a new command 00426 ** message. 00427 **------------------------------------------------------------------------------ 00428 ** Arguments: 00429 ** None 00430 ** 00431 ** Returns: 00432 ** True - OK to send new command. 00433 ** False - NOK to send new command. 00434 **------------------------------------------------------------------------------ 00435 */ 00436 EXTFUNC BOOL ( *pnABCC_DrvISReadyForCmd )( void ); 00437 00438 00439 /*------------------------------------------------------------------------------ 00440 ** Sets the number of simultaneous commands that is supported by the 00441 ** application. 00442 **------------------------------------------------------------------------------ 00443 ** Arguments: 00444 ** bNbrOfCmds - Number of commands that the application is ready to receive. 00445 ** 00446 ** Returns: 00447 ** None 00448 **------------------------------------------------------------------------------ 00449 */ 00450 EXTFUNC void ( *pnABCC_DrvSetNbrOfCmds )( UINT8 bNbrOfCmds ); 00451 00452 /*------------------------------------------------------------------------------ 00453 ** Sets the current application status. 00454 ** Note! This information is not supported by all protocols. 00455 **------------------------------------------------------------------------------ 00456 ** Arguments: 00457 ** eAppStatus - Current application status. 00458 ** 00459 ** Returns: 00460 ** None. 00461 **------------------------------------------------------------------------------ 00462 */ 00463 EXTFUNC void ( *pnABCC_DrvSetAppStatus )( ABP_AppStatusType eAppStatus ); 00464 00465 /*------------------------------------------------------------------------------ 00466 ** Sets the current process data size. 00467 **------------------------------------------------------------------------------ 00468 ** Arguments: 00469 ** iReadPdSize - Size of read process data (bytes) 00470 ** iWritePdSize - Size of write process data (bytes) 00471 ** 00472 ** Returns: 00473 ** None. 00474 **------------------------------------------------------------------------------ 00475 */ 00476 EXTFUNC void ( *pnABCC_DrvSetPdSize )( const UINT16 iReadPdSize, 00477 const UINT16 iWritePdSize ); 00478 00479 /*------------------------------------------------------------------------------ 00480 ** Sets Interrupt mask according to h_aci.h. 00481 **------------------------------------------------------------------------------ 00482 ** Arguments: 00483 ** iIntMask - Interrupt mask set according to h_aci.h. 00484 ** 00485 ** Returns: 00486 ** None 00487 **------------------------------------------------------------------------------ 00488 */ 00489 EXTFUNC void ( *pnABCC_DrvSetIntMask )( const UINT16 iIntMask ); 00490 00491 /*------------------------------------------------------------------------------ 00492 ** Get WrpdBuffer for the user to update. 00493 **------------------------------------------------------------------------------ 00494 ** Arguments: 00495 ** None 00496 ** 00497 ** Returns: 00498 ** Pointer to WrPd buffer. 00499 **------------------------------------------------------------------------------ 00500 */ 00501 EXTFUNC void* ( *pnABCC_DrvGetWrPdBuffer )( void ); 00502 00503 /*------------------------------------------------------------------------------ 00504 ** Read module capabillity 00505 **------------------------------------------------------------------------------ 00506 ** Arguments: 00507 ** None. 00508 ** 00509 ** Returns: 00510 ** Module capability. 00511 **------------------------------------------------------------------------------ 00512 */ 00513 EXTFUNC UINT16 ( *pnABCC_DrvGetModCap )( void ); 00514 00515 /*------------------------------------------------------------------------------ 00516 ** Read module capability 00517 **------------------------------------------------------------------------------ 00518 ** Arguments: 00519 ** None. 00520 ** 00521 ** Returns: 00522 ** Module capability. 00523 **------------------------------------------------------------------------------ 00524 */ 00525 EXTFUNC UINT16 ( *pnABCC_DrvGetLedStatus )( void ); 00526 00527 /*------------------------------------------------------------------------------ 00528 ** Gets the Anybus interrupt status. The pnABCC_DrvISR() function will clear all 00529 ** pending interrupts. This function must be called before pnABCC_DrvISR() or it 00530 ** will always return 0. 00531 **------------------------------------------------------------------------------ 00532 ** Arguments: 00533 ** None. 00534 ** 00535 ** Returns: 00536 ** The Anybus interrupt status. 00537 **------------------------------------------------------------------------------ 00538 */ 00539 /*EXTFUNC UINT16 ( *pnABCC_DrvGetIntStatus )( void );*/ 00540 00541 /*------------------------------------------------------------------------------ 00542 ** Gets the Anybus state. 00543 **------------------------------------------------------------------------------ 00544 ** Arguments: 00545 ** None 00546 ** 00547 ** Returns: 00548 ** The Anybus state 00549 **------------------------------------------------------------------------------ 00550 */ 00551 EXTFUNC UINT8 ( *pnABCC_DrvGetAnybusState )( void ); 00552 00553 /*------------------------------------------------------------------------------ 00554 ** Reads the read process data. 00555 **------------------------------------------------------------------------------ 00556 ** Arguments: 00557 ** None. 00558 ** 00559 ** Returns: 00560 ** A pointer to the read process data; or NULL if no process data to read 00561 ** was available. 00562 **------------------------------------------------------------------------------ 00563 */ 00564 EXTFUNC void* ( *pnABCC_DrvReadProcessData )( void ); 00565 00566 /*------------------------------------------------------------------------------ 00567 ** Reads the read message. 00568 **------------------------------------------------------------------------------ 00569 ** Arguments: 00570 ** None. 00571 ** 00572 ** Returns: 00573 ** A pointer to the read message; or NULL if no message is available. 00574 ** The pointer, if not NULL, will point to the buffer previously set by 00575 ** calling pnABCC_DrvSetMsgReceiverBuffer(). 00576 **------------------------------------------------------------------------------ 00577 */ 00578 EXTFUNC ABP_MsgType* ( *pnABCC_DrvReadMessage )( void ); 00579 00580 /*------------------------------------------------------------------------------ 00581 ** Returns supervision bit in status register. 00582 **------------------------------------------------------------------------------ 00583 ** Arguments: 00584 ** None 00585 ** 00586 ** Returns: 00587 ** TRUE: The device is supervised by another network device. 00588 **------------------------------------------------------------------------------ 00589 */ 00590 EXTFUNC BOOL ( *pnABCC_DrvIsSupervised )( void ); 00591 00592 /*------------------------------------------------------------------------------ 00593 ** Returns anybus status register. 00594 **------------------------------------------------------------------------------ 00595 ** Arguments: 00596 ** None 00597 ** 00598 ** Returns: 00599 ** Anybus status register 00600 **------------------------------------------------------------------------------ 00601 */ 00602 EXTFUNC UINT8 ( *pnABCC_DrvGetAnbStatus )( void ); 00603 00604 #endif /* inclusion lock */ 00605 00606 /******************************************************************************* 00607 ** End of drv_if.h 00608 ******************************************************************************** 00609 */
Generated on Tue Jul 12 2022 15:51:56 by
