This is a complete listing of the RS-EDP software for the mbed module to support the RS-EDP platform.

Dependencies:   mbed

Committer:
DavidGilesHitex
Date:
Fri Nov 19 09:49:16 2010 +0000
Revision:
0:5b7639d1f2c4

        

Who changed what in which revision?

UserRevisionLine numberNew contents of line
DavidGilesHitex 0:5b7639d1f2c4 1 /* Header File for the Serial Input Latch PCA9675 Device on the RS-EDP Base Board */
DavidGilesHitex 0:5b7639d1f2c4 2 /* ****************************************************************************** */
DavidGilesHitex 0:5b7639d1f2c4 3
DavidGilesHitex 0:5b7639d1f2c4 4
DavidGilesHitex 0:5b7639d1f2c4 5 extern sint32_t RSEDP_BB_setup_PCA9675(uint8_t Slave_Address);
DavidGilesHitex 0:5b7639d1f2c4 6 /* Setup and configure the serial I/O latch for input reading mode */
DavidGilesHitex 0:5b7639d1f2c4 7 /* This function is called to reset the device to configure the I/O to input mode */
DavidGilesHitex 0:5b7639d1f2c4 8 /* The only parameter to be passed is the Slave Address of the device on the board. */
DavidGilesHitex 0:5b7639d1f2c4 9
DavidGilesHitex 0:5b7639d1f2c4 10
DavidGilesHitex 0:5b7639d1f2c4 11 extern sint32_t RSEDP_BB_PCA9675_reset(uint8_t Slave_Address);
DavidGilesHitex 0:5b7639d1f2c4 12 /* Reset the device using a general call */
DavidGilesHitex 0:5b7639d1f2c4 13 /* This function uses the general call address feature to reset the device to power on status */
DavidGilesHitex 0:5b7639d1f2c4 14
DavidGilesHitex 0:5b7639d1f2c4 15
DavidGilesHitex 0:5b7639d1f2c4 16
DavidGilesHitex 0:5b7639d1f2c4 17 extern sint32_t RSEDP_BB_PCA9675_write_data(uint8_t Slave_Address, uint8_t port0_payload, uint8_t port1_payload);
DavidGilesHitex 0:5b7639d1f2c4 18 /* Write two bytes to the device */
DavidGilesHitex 0:5b7639d1f2c4 19 /* This function writes two bytes, the first to the Port0 and second to Port1 */
DavidGilesHitex 0:5b7639d1f2c4 20
DavidGilesHitex 0:5b7639d1f2c4 21
DavidGilesHitex 0:5b7639d1f2c4 22 extern sint32_t RSEDP_BB_PCA9675_read_data(uint8_t Slave_Address, uint8_t *read_port0, uint8_t *read_port1);
DavidGilesHitex 0:5b7639d1f2c4 23 /* Read two bytes from the device */
DavidGilesHitex 0:5b7639d1f2c4 24
DavidGilesHitex 0:5b7639d1f2c4 25 extern sint32_t RS_EDP_BB_Read_DIP_Switch(uint8_t Switch_Number, uint8_t *Switch_Status);
DavidGilesHitex 0:5b7639d1f2c4 26 /* Read the switch position - either on or off */
DavidGilesHitex 0:5b7639d1f2c4 27 /* Call this function with a value 1 to 8 for the actual on/off status of the switch */
DavidGilesHitex 0:5b7639d1f2c4 28 /* the retrun status is 'DIP_SWITCH_ON' or 'DIP_SWITCH_OFF' */
DavidGilesHitex 0:5b7639d1f2c4 29 /* you can call this function with 'ALL_DIP_SWITCHES' and the value return is the 8 bit number read by the latch */