nfa_nv_ci.h revision e29968cf3e053557a9c2efc5a7a42d0767c51d9d
1/***************************************************************************** 2** 3** Name: nfa_fs_ci.h 4** 5** Description: This is the interface file for non valtile memory 6** call-in functions. 7** 8** Copyright (c) 2003-2009, Broadcom Corp., All Rights Reserved. 9** Widcomm Bluetooth Core. Proprietary and confidential. 10** 11*****************************************************************************/ 12#ifndef NFA_NV_CI_H 13#define NFA_NV_CI_H 14 15#include "nfa_nv_co.h" 16 17/***************************************************************************** 18** Constants and data types 19*****************************************************************************/ 20 21/* Read Ready Event */ 22typedef struct 23{ 24 BT_HDR hdr; 25 tNFA_NV_CO_STATUS status; 26 int fd; 27 UINT16 num_read; 28} tNFA_NV_CI_READ_EVT; 29 30/* Write Ready Event */ 31typedef struct 32{ 33 BT_HDR hdr; 34 tNFA_NV_CO_STATUS status; 35 int fd; 36} tNFA_NV_CI_WRITE_EVT; 37 38/***************************************************************************** 39** Function Declarations 40*****************************************************************************/ 41#ifdef __cplusplus 42extern "C" 43{ 44#endif 45 46/******************************************************************************* 47** 48** Function nfa_nv_ci_write 49** 50** Description This function sends an event to NFAA indicating the phone 51** has written the number of bytes specified in the call-out 52** function, nfa_nv_co_write (), and is ready for more data. 53** This function is used to control the TX data flow. 54** Note: The data buffer is released by the stack aioer 55** calling this function. 56** 57** Parameters status - NFA_NV_CO_OK, NFA_NV_CO_NOSPACE, or NFA_NV_CO_FAIL 58** evt - Used Internally by NFA -> MUST be same value passed 59** in call-out function. 60** 61** Returns void 62** 63*******************************************************************************/ 64NFC_API extern void nfa_nv_ci_write (tNFA_NV_CO_STATUS status); 65 66/******************************************************************************* 67** 68** Function nfa_nv_ci_read 69** 70** Description This function sends an event to NFA indicating the phone has 71** read in the requested amount of data specified in the 72** nfa_nv_co_read () call-out function. It should only be called 73** when the requested number of bytes has been read. 74** 75** Parameters num_bytes_read - number of bytes read into the buffer 76** specified in the read callout-function. 77** status - NFA_NV_CO_OK if full buffer of data, 78** NFA_NV_CO_EOF if the end of file has been reached, 79** NFA_NV_CO_FAIL if an error has occurred. 80** evt - Used Internally by NFA -> MUST be same value passed 81** in call-out function. 82** 83** Returns void 84** 85*******************************************************************************/ 86NFC_API extern void nfa_nv_ci_read (UINT16 num_bytes_read, 87 tNFA_NV_CO_STATUS status, 88 UINT8 block); 89 90 91#ifdef __cplusplus 92} 93#endif 94 95#endif /* BTA_FS_CI_H */ 96 97