#ifndef DIPSWITCH_H #define DIPSWITCH_H #include "r_cg_macrodriver.h" #include "r_cg_port.h" // P8, PM8 사용 #ifdef __cplusplus extern "C" { #endif /** * DIP Switch 초기화 (입력 설정) */ void DipSwitch_Init(void); /** * DIP Switch(5bit)를 읽어 주소(1~32)로 변환해 반환 * - 회로: Pull-up, DIP ON -> GND (Active-Low) * - 핀: P8.1~P8.5 (ADD_1~ADD_5) */ /** * (옵션) 디버그용: DIP 5bit(0~31) 그대로 반환 * - ADD_1이 LSB */ uint8_t DipSwitch_ReadAddr_0to31(void); #ifdef __cplusplus } #endif #endif /* DIPSWITCH_H */