quec_pin_cfg.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. 
  2. /*================================================================
  3. Copyright (c) 2021, Quectel Wireless Solutions Co., Ltd. All rights reserved.
  4. Quectel Wireless Solutions Proprietary and Confidential.
  5. =================================================================*/
  6. /*=================================================================
  7. EDIT HISTORY FOR MODULE
  8. This section contains comments describing changes made to the module.
  9. Notice that changes are listed in reverse chronological order.
  10. WHEN WHO WHAT, WHERE, WHY
  11. ------------ ------- -------------------------------------------------------------------------------
  12. =================================================================*/
  13. #ifndef QUEC_PIN_CFG_H
  14. #define QUEC_PIN_CFG_H
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. #include <stdio.h>
  19. #include "quec_pin_index.h"
  20. #include "ql_gpio.h"
  21. /*===========================================================================
  22. * Macro
  23. ===========================================================================*/
  24. /*===========================================================================
  25. * Struct
  26. ===========================================================================*/
  27. typedef struct
  28. {
  29. uint8_t pin_num;
  30. uint8_t default_func;
  31. uint8_t gpio_func;
  32. ql_GpioNum gpio_num;
  33. ql_GpioDir gpio_dir;
  34. ql_PullMode gpio_pull;
  35. ql_LvlMode gpio_lvl;
  36. volatile uint32_t *reg;
  37. volatile uint32_t *anareg;
  38. uint8_t drv_bits;
  39. } quec_pin_cfg_t;
  40. #if (defined(CONFIG_QL_OPEN_EXPORT_PKG) && defined(CONFIG_QUEC_PROJECT_FEATURE_PSM))
  41. typedef struct
  42. {
  43. ql_GpioNum gpio_num;
  44. ql_LvlMode gpio_lvl;
  45. uint8_t enable;
  46. }quec_psm_pin_cfg_t;
  47. #endif
  48. /*===========================================================================
  49. * Extern
  50. ===========================================================================*/
  51. extern const quec_pin_cfg_t quec_pin_cfg_map[];
  52. #if (defined(CONFIG_QL_OPEN_EXPORT_PKG) && defined(CONFIG_QUEC_PROJECT_FEATURE_PSM))
  53. extern const quec_psm_pin_cfg_t quec_psm_pin_cfg[];
  54. #endif
  55. #ifdef __cplusplus
  56. } /*"C" */
  57. #endif
  58. #endif /* QUEC_PIN_CFG_H */