| 전자부품 데이터시트 검색엔진 |
|
MCP2200 데이터시트(PDF) 14 Page - Microchip Technology |
|
|
|||||||||||||||||||||||||||||
MCP2200 데이터시트(HTML) 14 Page - Microchip Technology |
|
14 / 34 page ![]() MCP2200 DS22228A-page 14 2010 Microchip Technology Inc. Returns: true if the pin was successfully read. false if the pin was not read (not configued as an input). Example: <code> unsigned int rv; if (SimpleIOClass::ReadGPIOn (0, &rv)) { lblStatusBar->Text = "Success"; } else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> 2.3.1.17 WritePort bool SimpleIOClass::WritePort(unsigned int portValue) Summary: Writes a value to the GPIO port. Description: Writes the GPIO port. This provides a means to write all pins at once instead of one-at- a-time. Precondition: Must have previously been configured as an output via a ConfigureGPIO call. Parameters: portValue - Byte value to set on the port. Returns: Function returns true if the transmission is successful returns False if there the transmission fails. Example: <code> if (SimpleIOClass::WritePort (0x5A)) { lblStatusBar->Text = "Success"; } else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> Remarks: Pins configured for output returns the current state of the port. Pins configured as input read as zero. 2.3.1.18 ReadPort bool SimpleIOClass::ReadPort(unsigned int *returnvalue) Summary: Reads the GPIO port as digital input. Description: Reads the GPIO port and returns the value in returnvalue. This provides a means to read all pins at once instead of one-at-a-time. Precondition: Must have previously been configured as an input via a ConfigureGPIO call. Parameters: returnvalue - the value read on the port. Returns: Function returns true if the read is successful returns False if there the transmission fails. Example: <code> unsigned int rv; if (SimpleIOClass::ReadGPIOPort (&rv)) { lblStatusBar->Text = "Success"; } else lblStatusBar->Text = "Invalid command " + SimpleIOClass::LastError; </code> Remarks: Pins configured for output returns the current state of the port. Pins configured as input read as zero. |
|
링크 URL |
| 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 |