others.h 715 B

1234567891011121314151617181920212223242526
  1. #ifndef __OTHERS_H__
  2. #define __OTHERS_H__
  3. #define PWR_EN_PIN GPIO_Pin_5
  4. #define PWR_EN_PORT GPIOB
  5. #define PWR_EN_HIGH PWR_EN_PORT->BSRR = PWR_EN_PIN //À­¸ß
  6. #define PWR_EN_LOW PWR_EN_PORT->BRR = PWR_EN_PIN
  7. #define BEEP_PIN GPIO_Pin_7
  8. #define BEEP_PORT GPIOB
  9. #define MIC_MUTE_PIN GPIO_Pin_1
  10. #define MIC_MUTE_PORT GPIOA
  11. #define SPK_MUTE_PIN GPIO_Pin_0
  12. #define SPK_MUTE_PORT GPIOB
  13. #define MicCtrl(bit) bit?(MIC_MUTE_PORT->BRR=MIC_MUTE_PIN):(MIC_MUTE_PORT->BSRR=MIC_MUTE_PIN)
  14. #define SpeakerCtrl(bit) bit?(SPK_MUTE_PORT->BRR=SPK_MUTE_PIN):(SPK_MUTE_PORT->BSRR=SPK_MUTE_PIN)
  15. void OtherInit(void);
  16. void RCC_ClockInit(unsigned char enable);
  17. void MY_NVIC_Init(void);
  18. void AllGPIO_Init(void);
  19. #endif