Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
dido.h
00001 #include "mbed.h" 00002 00003 00004 //--------------------------------------- 00005 // Definitions 00006 //--------------------------------------- 00007 #define DIDO_I2C_ADD ( I2C_BASE_ADDRESS + (5 << 1) ) // 00008 00009 00010 #define DIDO_DO1 ( 2 ) // MCP23008 GPIO: 2 00011 #define DIDO_DO2 ( 1 ) // MCP23008 GPIO: 1 00012 #define DIDO_RELAY ( 0 ) // MCP23008 GPIO: 0 00013 #define DIDO_DI1 ( 7 ) // MCP23008 GPIO: 7 00014 #define DIDO_DI2 ( 6 ) // MCP23008 GPIO: 6 00015 #define DIDO_DI3 ( 5 ) // MCP23008 GPIO: 5 00016 #define DIDO_DI4 ( 4 ) // MCP23008 GPIO: 4 00017 #define DIDO_DI5 ( 3 ) // MCP23008 GPIO: 3 00018 00019 00020 //--------------------------------------- 00021 // Enums 00022 //--------------------------------------- 00023 00024 00025 00026 00027 00028 //--------------------------------------- 00029 // Structures 00030 //--------------------------------------- 00031 00032 00033 00034 00035 //--------------------------------------- 00036 // Global Variables 00037 //--------------------------------------- 00038 00039 00040 00041 //--------------------------------------- 00042 // Global Functions 00043 //--------------------------------------- 00044 void DIDO_init( void ); 00045 00046 void DIDO_setDO1ON( void ); 00047 void DIDO_setDO1OFF( void ); 00048 void DIDO_setDO2ON( void ); 00049 void DIDO_setDO2OFF( void ); 00050 void DIDO_setRelayON( void ); 00051 void DIDO_setRelayOFF( void ); 00052 00053 // Return: 00054 // 0 = off, or low input level 00055 // >= 1: On, or high input level 00056 int DIDO_getDO1( void ); 00057 int DIDO_getDO2( void ); 00058 int DIDO_getRelay( void ); 00059 int DIDO_getDI1( void ); 00060 int DIDO_getDI2( void ); 00061 int DIDO_getDI3( void ); 00062 int DIDO_getDI4( void ); 00063 int DIDO_getDI5( void );
Generated on Sat Jul 16 2022 03:23:51 by
