drv_mfx.h 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright (c) 2006-2021, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2020-08-08 thread-liu first version
  9. */
  10. #ifndef __DRV_MFX_H__
  11. #define __DRV_MFX_H__
  12. #include "board.h"
  13. #include "mfxstm32l152.h"
  14. #ifdef __cplusplus
  15. extern "C" {
  16. #endif
  17. typedef enum
  18. {
  19. BSP_IO_PIN_RESET = 0,
  20. BSP_IO_PIN_SET = 1
  21. }BSP_IO_PinStateTypeDef;
  22. #define CAMERA_RST1 MFXSTM32L152_AGPIO_PIN_3
  23. #define CAMERA_XSDN MFXSTM32L152_AGPIO_PIN_2
  24. #define CARMERA_PLUG MFXSTM32L152_GPIO_PIN_12
  25. void rt_mfx_init(void);
  26. rt_uint32_t BSP_IO_ITGetStatus(rt_uint32_t IoPin);
  27. void BSP_IO_ITClear(void);
  28. void BSP_IO_ITClearPin(rt_uint32_t IO_Pins_To_Clear);
  29. rt_uint8_t rt_mfx_pin_mode(rt_uint32_t IoPin, IO_ModeTypedef IoMode);
  30. rt_uint8_t rt_mfx_config_irq(rt_uint8_t IoIrqOutPinPolarity, rt_uint8_t IoIrqOutPinType);
  31. void rt_mfx_pin_write(rt_uint32_t IoPin, rt_base_t PinState);
  32. rt_uint32_t rt_mfx_pin_read(rt_uint32_t IoPin);
  33. void rt_mfx_pin_toggle(rt_uint32_t IoPin);
  34. #ifdef __cplusplus
  35. }
  36. #endif
  37. #endif