drv_wcn.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. /* Copyright (C) 2019 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _DRV_WCN_H_
  13. #define _DRV_WCN_H_
  14. #include "osi_compiler.h"
  15. OSI_EXTERN_C_BEGIN
  16. typedef struct drv_wcn drvWcn_t;
  17. typedef enum
  18. {
  19. WCN_USER_WIFI = (1 << 0),
  20. WCN_USER_BT = (1 << 1),
  21. } drvWcnUser_t;
  22. /**
  23. * \brief open wcn
  24. *
  25. * \param user caller user
  26. * \return
  27. * - NULL if fail else the wcn context
  28. */
  29. drvWcn_t *drvWcnOpen(drvWcnUser_t user);
  30. /**
  31. * \brief close wcn
  32. *
  33. * \param wcn the wcn context
  34. */
  35. void drvWcnClose(drvWcn_t *d, drvWcnUser_t user);
  36. /**
  37. * \brief request wcn resource
  38. *
  39. * \param wcn the wcn context
  40. * \return
  41. * - true on success else fail
  42. */
  43. bool drvWcnRequest(drvWcn_t *wcn);
  44. /**
  45. * \brief release wcn resource
  46. *
  47. * \paran wcn the wcn context
  48. */
  49. void drvWcnRelease(drvWcn_t *wcn);
  50. OSI_EXTERN_C_END
  51. #endif