netdev_interface.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. /* Copyright (C) 2018 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 _NETDEV_INTERFACE_H_
  13. #define _NETDEV_INTERFACE_H_
  14. #include <stdint.h>
  15. #include <stdbool.h>
  16. #include <stddef.h>
  17. #include "osi_compiler.h"
  18. OSI_EXTERN_C_BEGIN
  19. #include "drv_ether.h"
  20. /**
  21. * \brief netdev disconnect process
  22. */
  23. void netdevDisconnect(void);
  24. /**
  25. * \brief netdev connect process
  26. */
  27. void netdevConnect(void);
  28. /**
  29. * \brief netdev process on data channel active
  30. */
  31. void netdevNetUp(void);
  32. /**
  33. * \brief netdev process on data channel deactive
  34. */
  35. void netdevNetDown(uint8_t nSimID, uint8_t nCID);
  36. /**
  37. * \brief check if netdev is connected
  38. *
  39. * \return true on connected else false
  40. */
  41. bool netdevIsConnected(void);
  42. /**
  43. * \brief init and register ether to the netdev
  44. */
  45. void netdevInit(drvEther_t *ether);
  46. /**
  47. * \brief stop the netdev
  48. */
  49. void netdevExit(void);
  50. void netdevCheckEthConEvt(void);
  51. OSI_EXTERN_C_END
  52. #endif