| 数据搜索系统,热门电子元器件搜索 |
|
MCP2200 数据表(PDF) 13 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCP2200 数据表(HTML) 13 Page - Microchip Technology |
|
13 / 34 page ![]() 2010 Microchip Technology Inc. DS22228A-page 13 MCP2200 Precondition: The Vendor and Product ID must have been specified by SimpleIOInit. Parameters: IOMap - one byte, with each bit corresponding to each GP pin. 0 for output, 1 for input. Returns: Function returns true if the transmission is successful, returns False if there the transmission fails. Example: <code> if (SimpleIOClass::ConfigureGPIO(OutputPacketBuf fer) == SUCCESS) lblStatusBar->Text = "Success"; else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> 2.3.1.14 SetPin bool SimpleIOClass::SetPin(unsigned int pin) Summary: Sets the specified pin. Description: Sets the specified pin to one. Precondition: Must have previously been configured as an output via a ConfigureGPIO call. Parameters: pin - The pin number to set (0-7) Returns: Function returns true if the transmission is successful, returns False if there the transmission fails. Example: <code> if (SimpleIOClass::SetPin (2)) { lblStatusBar->Text = "Success"; } else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> Remarks: none 2.3.1.15 ClearPin bool SimpleIOClass::ClearPin(unsigned int pin) Summary: Clears the specified pin. Description: Sets the specified pin to zero. Precondition: Must have previously been configured as an output via a ConfigureGPIO call. Parameters: pin - The pin number to set (0-7) Returns: Function returns true if the transmission is successful, returns False if there the transmission fails. Example: <code> if (SimpleIOClass::ClearPin (2)) { lblStatusBar->Text = "Success"; } else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> Remarks: none 2.3.1.16 ReadPin bool SimpleIOClass::ReadPin(unsigned int pin, unsigned int *returnvalue) Summary: Reads the specified pin. Description: Reads the specified pin and returns the value in returnvalue. If the pin has been configured as Digital Input, the return value will be either 0 or 1. If the pin has been configured as Analog Input, the pin will be read by the ADC and return a 10 bit value, right justified. Precondition: Must have previously been configured as an input via a ConfigureGPIO call. Parameters: pin - The pin number to set (0-7) returnvalue - the value read on the pin (0 or 1) |
|
链接网址 |
| ALLDATASHEET是否为您带来帮助? [ DONATE ] |
关于 Alldatasheet | 广告服务 | 联系我们 | 隐私政策 | 数据表链接 | 链接交换 | 制造商名单 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |