AllJoyn/Samples/BACnetAdapter/bacnet-stack-0.8.2/ports/bdk-atxx4-mstp/input.c
static void input_switch_workaround(
    void)
{
    /* configure the port pins for the switch - as outputs */
    BIT_SET(DDRA, DDA0);
    BIT_SET(DDRA, DDA1);
    BIT_SET(DDRA, DDA2);
    BIT_SET(DDRA, DDA3);
    BIT_SET(DDRA, DDA4);
    BIT_SET(DDRA, DDA5);
    BIT_SET(DDRA, DDA6);
    /* turn off the outputs */
    BIT_CLEAR(PORTA, PORTA0);
    BIT_CLEAR(PORTA, PORTA1);
    BIT_CLEAR(PORTA, PORTA2);
    BIT_CLEAR(PORTA, PORTA3);
    BIT_CLEAR(PORTA, PORTA4);
    BIT_CLEAR(PORTA, PORTA5);
    BIT_CLEAR(PORTA, PORTA6);
    /* configure the port pins for the switch - as inputs */
    BIT_CLEAR(DDRA, DDA0);
    BIT_CLEAR(DDRA, DDA1);
    BIT_CLEAR(DDRA, DDA2);
    BIT_CLEAR(DDRA, DDA3);
    BIT_CLEAR(DDRA, DDA4);
    BIT_CLEAR(DDRA, DDA5);
    BIT_CLEAR(DDRA, DDA6);

    return;
}
/* version 1 BDK workaournd for floating inputs */
version 1 BDK workaournd for floating inputs
version 1 BDK workaournd for floating inputs
static void input_switch_workaround(
    void)
{
    BIT_SET(DDRA, DDA0);
    BIT_SET(DDRA, DDA1);
    BIT_SET(DDRA, DDA2);
    BIT_SET(DDRA, DDA3);
    BIT_SET(DDRA, DDA4);
    BIT_SET(DDRA, DDA5);
    BIT_SET(DDRA, DDA6);
    BIT_CLEAR(PORTA, PORTA0);
    BIT_CLEAR(PORTA, PORTA1);
    BIT_CLEAR(PORTA, PORTA2);
    BIT_CLEAR(PORTA, PORTA3);
    BIT_CLEAR(PORTA, PORTA4);
    BIT_CLEAR(PORTA, PORTA5);
    BIT_CLEAR(PORTA, PORTA6);
    BIT_CLEAR(DDRA, DDA0);
    BIT_CLEAR(DDRA, DDA1);
    BIT_CLEAR(DDRA, DDA2);
    BIT_CLEAR(DDRA, DDA3);
    BIT_CLEAR(DDRA, DDA4);
    BIT_CLEAR(DDRA, DDA5);
    BIT_CLEAR(DDRA, DDA6);
    return;
}
static void input_switch_workaround ( void ) { BIT_SET ( DDRA , DDA0 ) ; BIT_SET ( DDRA , DDA1 ) ; BIT_SET ( DDRA , DDA2 ) ; BIT_SET ( DDRA , DDA3 ) ; BIT_SET ( DDRA , DDA4 ) ; BIT_SET ( DDRA , DDA5 ) ; BIT_SET ( DDRA , DDA6 ) ; BIT_CLEAR ( PORTA , PORTA0 ) ; BIT_CLEAR ( PORTA , PORTA1 ) ; BIT_CLEAR ( PORTA , PORTA2 ) ; BIT_CLEAR ( PORTA , PORTA3 ) ; BIT_CLEAR ( PORTA , PORTA4 ) ; BIT_CLEAR ( PORTA , PORTA5 ) ; BIT_CLEAR ( PORTA , PORTA6 ) ; BIT_CLEAR ( DDRA , DDA0 ) ; BIT_CLEAR ( DDRA , DDA1 ) ; BIT_CLEAR ( DDRA , DDA2 ) ; BIT_CLEAR ( DDRA , DDA3 ) ; BIT_CLEAR ( DDRA , DDA4 ) ; BIT_CLEAR ( DDRA , DDA5 ) ; BIT_CLEAR ( DDRA , DDA6 ) ; return ; }
version 1 BDK workaournd for floating inputs
version 1 BDK workaournd for floating inputs
/* configure the port pins for the switch - as outputs */ /* turn off the outputs */ /* configure the port pins for the switch - as inputs */