#ifndef _BOARD_GPI_H_ #define _BOARD_GPI_H_ /********************************************************************* * INCLUDES */ //#include "common.h" /********************************************************************* * DEFINITIONS */ #include "nrf_gpio.h" #define LEDS_NUMBER 4 #define LED_START 17 #define LED_1 17 #define LED_2 18 #define LED_3 19 #define LED_4 20 #define LED_STOP 20 //#define CTRL_LED_EN 9 //#define CTRL_BUZZER_EN 10 #if 1 #define CTRL_LED_EN 7 #define CTRL_BUZZER_EN 11 #define CTRL_MIC_EN 12 #define CTRL_SPEAKER_EN 13 #endif #if 0 #define CTRL_LED_EN 5 #define CTRL_BUZZER_EN 7 #define CTRL_MIC_EN 12 #define CTRL_SPEAKER_EN 13 #endif #define APP_TIMER_PRESCALER 0 // Value of the RTC1 PRESCALER register. #define APP_TIMER_MAX_TIMERS 1 // Maximum number of simultaneously created timers. #define APP_TIMER_OP_QUEUE_SIZE 2 // Size of timer operation queues. #define BUTTON_DEBOUNCE_DELAY 50 // Delay from a GPIOTE event until a button is reported as pushed. #define APP_GPIOTE_MAX_USERS 1 // Maximum number of users of the GPIOTE handler. #define ADVERTISING_LED BSP_BOARD_LED_0 /**< Is on when device is advertising. */ #define CONNECTED_LED BSP_BOARD_LED_1 /**< Is on when device has connected. */ #define LEDBUTTON_LED BSP_BOARD_LED_2 /**< LED to be toggled with the help of the LED Button Service. */ #define LEDBUTTON_BUTTON BSP_BUTTON_0 /**< Button that will trigger the notification event with the LED Button Service */ #define BUTTON_DETECTION_DELAY APP_TIMER_TICKS(50) /**< Delay from a GPIOTE event until a button is reported as pushed (in number of timer ticks). */ #define KEY_IRQ_ON 0 #define KEY_IRQ_OFF 1 #define KEY_LEFT_VALUE 0x01 // Break value #define KEY_RIGHT_VALUE 0x02 #define KEY_LEFT_IO 26 // Left button #define KEY_RIGHT_IO 28 // right click #ifndef IRQ_DEBOUNCE_TIMEOUT #define IRQ_DEBOUNCE_TIMEOUT APP_TIMER_TICKS(20) // Timeout time (20ms) #endif /********************************************************************* * API FUNCTIONS */ void ParkOutputsOff(void); void ParkOutputsOn(void); void PKLedOn(void); void PKLedOff(void); void PKBuzzerOn(void); void PKBuzzerOff(void); void PKMicOn(void); void PKMicOff(void); void PKSpeakerOn(void); void PKSpeakerOff(void); void ParkOutputTest(); extern const uint8_t m_board_led_list[]; #endif /* _BOARD_GPI_H_ */