src/AduProtocol.c
/**
 * Handler for the "PI" command, which responds with the concatenated status of
 * PORT A and PORT B (where PORT A forms bits 3:0 and PORT B forms bits 7:4) as
 * a decimal value.
 *
 * @post On success, populates the response buffer with the port status
 *
 * @param[in] args The non-fixed portion of the command string (if any)
 *
 * @return Returns true on success or false on failure
 */
Handler for the "PI" command, which responds with the concatenated status of
PORT A and PORT B (where PORT A forms bits 3:0 and PORT B forms bits 7:4) as
a decimal value.

@post On success, populates the response buffer with the port status

@param[in] args The non-fixed portion of the command string (if any)

@return Returns true on success or false on failure
Handler for the " PI " command which responds with the concatenated status of PORT A and PORT B ( where PORT A forms bits 3 : 0 and PORT B forms bits 7 : 4 ) as a decimal value . @post On success populates the response buffer with the port status @param [ in ] args The non - fixed portion of the command string ( if any ) @return Returns true on success or false on failure
static bool HandlerReadCombinedPortsDecimal(const char *args)
{
    BoardDebugPrint("Hit %s\r\n", __func__);
    bool success = false;
    if (strlen(args) == 0)
    {
        WriteResponseDecimal(BoardReadDigitalInputs(), DEC_DIGITS_8_BIT);
        success = true;
    }
    return success;
}
static bool HandlerReadCombinedPortsDecimal ( const char * args ) { BoardDebugPrint ( " \r \n " , __func__ ) ; bool success = false ; if ( strlen ( args ) == 0 ) { WriteResponseDecimal ( BoardReadDigitalInputs ( ) , DEC_DIGITS_8_BIT ) ; success = true ; } return success ; }
Handler for the "PI" command, which responds with the concatenated status of
 PORT A and PORT B (where PORT A forms bits 3:0 and PORT B forms bits 7:4) as
 a decimal value.
Handler for the " PI " command which responds with the concatenated status of PORT A and PORT B ( where PORT A forms bits 3 : 0 and PORT B forms bits 7 : 4 ) as a decimal value .
// There should be no character arguments to this command