void ISA1200_Enable(void) { /* - isa_freq 175Hz : 0xD6 185Hz : 0xCA - isa_duty 175Hz : 0xD6 À϶§ 50% : 0x6B / 99% : 0xD6 185Hz : 0xCA À϶§ 50% : 0x65 / 99% : 0xCA */ /*175hz 99% duty setting*/ theSink.isa_freq = 0xD6; /*175hz*/ theSink.isa_duty = 0x6B; /*duty 50%*/ theSink.isa_dimlev = 0; PioSetDir32(ISAEN_PIN, ISAEN_PIN); PioSetDir32(LEN_PIN, LEN_PIN); PioSetDir32(HEN_PIN, HEN_PIN); PioSet32(ISAEN_PIN, ISAEN_PIN); PioSet32(HEN_PIN, HEN_PIN); wait_time(20); PioSet32(LEN_PIN, LEN_PIN); }
void ISA1200_Disable(void) { PioSetDir32(ISAEN_PIN, ISAEN_PIN); PioSetDir32(LEN_PIN, LEN_PIN); PioSetDir32(HEN_PIN, HEN_PIN); PioSet32(ISAEN_PIN, 0); PioSet32(HEN_PIN, 0); wait_time(20); PioSet32(LEN_PIN, 0); theSink.isa_dimlev = 0; }
/**************************************************************************** NAME setChargeEnablePio DESCRIPTION This function is called to set/reset the charge enable pio line RETURNS void */ static void setChargeEnablePio(bool state) { if( theHeadset.PIO->ChargerEnablePIO != 0xF ) { PioSetDir32(1 << theHeadset.PIO->ChargerEnablePIO, 1 << theHeadset.PIO->ChargerEnablePIO); if(state) PioSet32(1 << theHeadset.PIO->ChargerEnablePIO, ~0); else PioSet32(1 << theHeadset.PIO->ChargerEnablePIO, 0); } }