beautypg.com

Appendix b, Digital input/output control – Lanner LVC-5000(N4) User Manual

Page 33

background image

33

Digital Input/Output Control

Appendix B

Embedded and Industrial Computing

exit_SIO_config();

return;
}
void dio_set_output(unsigned char out_value)
{

enter_SIO_config();

write_SIO_reg(0x6, 0xf1, ((read_SIO_reg(0x6,

0xf1)& 0xF0)|out_value));

exit_SIO_config();

return;
}

unsigned int dio_get_input(void)
{
unsigned int tmp=0x00;

enter_SIO_config();

tmp=read_SIO_reg(0x6, 0xA2)& 0x0f;

exit_SIO_config();

return tmp;
}

//======================================

========================================

=================
#endif