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.
do.h
00001 #include "mbed.h" 00002 00003 00004 00005 //--------------------------------------- 00006 // Definitions 00007 //--------------------------------------- 00008 #define DO_I2C_ADD ( I2C_BASE_ADDRESS | (7 << 1) ) // I2C_BASE_ADDRESS is defined in MCP23017 00009 #define DO_NUMBER_PINS ( 16 ) 00010 00011 00012 //--------------------------------------- 00013 // Enums 00014 //--------------------------------------- 00015 00016 // define pin number (0..15) of MCP23017 00017 typedef enum 00018 { 00019 DO_PIN1 = 15, 00020 DO_PIN2 = 14, 00021 DO_PIN3 = 13, 00022 DO_PIN4 = 12, 00023 DO_PIN5 = 11, 00024 DO_PIN6 = 10, 00025 DO_PIN7 = 9, 00026 DO_PIN8 = 8, 00027 DO_PIN9 = 7, 00028 DO_PIN10 = 6, 00029 DO_PIN11 = 5, 00030 DO_PIN12 = 4, 00031 DO_PIN13 = 3, 00032 DO_PIN14 = 2, 00033 DO_PIN15 = 1, 00034 DO_PIN16 = 0 00035 }DO_ePinTable; 00036 00037 00038 // Global commands 0 - 20 are defined in interpret.h 00039 // Commands 21 - 127 are HW-unit commands 00040 typedef enum 00041 { 00042 DO_GET_SINGLE = 21, // 21: getSingle 00043 DO_GET_PORT, // 22: getPort 00044 //---------------- 00045 CNT_eDO_command 00046 }eDO_command; 00047 00048 00049 00050 //--------------------------------------- 00051 // Structures 00052 //--------------------------------------- 00053 00054 00055 00056 //--------------------------------------- 00057 // Global Variables 00058 //--------------------------------------- 00059 00060 00061 00062 //--------------------------------------- 00063 // Global Functions 00064 //--------------------------------------- 00065 void DO_init( void ); 00066 void DO_deviceID_process( void );
Generated on Sat Jul 16 2022 03:23:51 by
