//////////////////////////////////////////////////////////////////////// // // bios modules for Pico-2 // version 2.5 (May 6, 2010) // // (c) Hideki Kozima (xkozima@myu.ac.jp), subject to GPLv2 // #ifndef BIOS_H #define BIOS_H #include "sh7046f.h" // header for sh7046f // // SWT: address switches (SW1-5 = PE21-17) // void SWT_init (void); // ushort SWT_get (void); void SWT_init (void); ushort SWT_get (void); // // LED: indicators (LED1-5 = PE16-12) // void LED_init (void); // void LED_set (ushort dataW5); // void LED_op (ushort locW5, ushort dataW5); void LED_init (void); void LED_set (ushort dataW5); ushort LED_get (void); void LED_op (ushort locW5, ushort dataW5); // // PWM: PWM/DIR output (TIOC0A-D; PE11,9,7,5) // void PWM_init (void); // void PWM_set (uchar numB2, short valW); void PWM_init (void); void PWM_set (uchar numB2, short valW); // // RCS: RC servo output to CN6=RCS (PE10,8,6,4) // void RCS_init (void); // void RCS_set (uchar numB2, ushort valW); void RCS_init (void); void RCS_set (uchar numB2, ushort valW); // // ENC: encoder interface (ZEN2044F) // void ENC_init (void); // int ENC_get (uchar numB2); // void ENC_set (uchar numB2, int count); void ENC_init (void); int ENC_get (uchar numB2); void ENC_set (uchar numB2, int count); // // SEN: current sensor input (AN19-16) // void SEN_init (void); // ushort SEN_get (uchar numB2); // void SEN_gets (ushort *sen0W, *sen1W, *sen2W, *sen3W); void SEN_init (void); ushort SEN_get (uchar numB2); void SEN_gets (ushort *sen0W, ushort *sen1W, ushort *sen2W, ushort *sen3W ); // // LIO: logic I/O on CN7=LIO (PB5-2) // void LIO_init (uchar dirB4); // void LIO_set (uchar valB4); // ushort LIO_get (void); void LIO_init (uchar dirB4); void LIO_set (uchar valB4); ushort LIO_get (void); // // LIN: logic input of CN8=ALINX (PF11-8) and CN9=ALINY (PF15-12) // void LIN_init (void); // ushort LIN_get (void); void LIN_init (void); ushort LIN_get (void); // // AIX: analog input of CN8=ALINX (PF11-8) // void AIX_init (void); // void AIX_gets (ushort *val0W, ushort *val1W, // ushort *val2W, ushort *val3W ); void AIX_init (void); void AIX_gets (ushort *val0W, ushort *val1W, ushort *val2W, ushort *val3W ); // // AIY: analog input of CN8=ALINY (PF15-12) // void AIY_init (void); // void AIY_gets (ushort *val0W, ushort *val1W, // ushort *val2W, ushort *val3W ); void AIY_init (void); void AIY_gets (ushort *val0W, ushort *val1W, ushort *val2W, ushort *val3W ); // // CMT0: compare match timer // void CMT0_init (uchar cselB2, ushort periodW, void (*action)()); // void CMT0_quit (void); void CMT0_init (uchar cselB2, ushort periodW, void (*action)()); void CMT0_quit (void); // // CMT1: compare match timer // void CMT1_init (uchar cselB2, ushort periodW, void (*action)()); // void CMT1_quit (void); void CMT1_init (uchar cselB2, ushort periodW, void (*action)()); void CMT1_quit (void); // // SCI: serial port (RS485) // void SCI_init (uchar addr_mask, uchar addr, // uchar pack_len, void *interpreter()); // void SCI_transmit (uchar *packet); // void SCI_quit (void); void SCI_init (uchar addr, uchar paclen, void *interpreter()); void SCI_transmit (uchar *packet); void SCI_quit (void); // // WDT: watch dog timer (WDT) // void WDT_init (uchar cselB3); // void WDT_reset (); // int WDT_check (); void WDT_init (uchar cselB3); void WDT_reset (); int WDT_check (); #endif ////////////////////////////////////////////////////////////////////////