picoos-ow  1.xxxx
Configuration
#define OWCFG_READ_IN()   ( (P2IN & BIT6) ? 1 : 0 )
 
#define OWCFG_OUT_LOW()   P2OUT &= ~BIT6; P2DIR |= BIT6
 
#define OWCFG_OUT_HIGH()   P2OUT |= BIT6; P2DIR |= BIT6
 
#define OWCFG_DIR_IN()   P2DIR &= ~(BIT6)
 
#define OWCFG_DIR_OUT()   P2DIR |= BIT6
 
#define OWCFG_POWER_ON()   P2DIR |= BIT7; P2OUT |= BIT7
 
#define OWCFG_POWER_OFF()   P2OUT &= ~BIT7
 

Detailed Description

Macro Definition Documentation

§ OWCFG_READ_IN

#define OWCFG_READ_IN ( )    ( (P2IN & BIT6) ? 1 : 0 )

Configure GPIO operation to be used when library wants to read bus state.

§ OWCFG_OUT_LOW

#define OWCFG_OUT_LOW ( )    P2OUT &= ~BIT6; P2DIR |= BIT6

Configure GPIO operation to be used when library wants to drive bus low. This operation should also put pin to output mode (note that order of changing pin value and direction is chip dependent).

§ OWCFG_OUT_HIGH

#define OWCFG_OUT_HIGH ( )    P2OUT |= BIT6; P2DIR |= BIT6

Configure GPIO operation to be used when library wants to drive bus high to deliver strong pull-up. This operation should also put pin to output mode (note that order of changing pin value and direction is chip dependent).

§ OWCFG_DIR_IN

#define OWCFG_DIR_IN ( )    P2DIR &= ~(BIT6)

Configure GPIO operation to be used when library wants to change bus pin into input (floating).

§ OWCFG_DIR_OUT

#define OWCFG_DIR_OUT ( )    P2DIR |= BIT6
Deprecated:
Configure GPIO operation to be used when library wants to change bus pin into output (for driving it high or low).

§ OWCFG_POWER_ON

#define OWCFG_POWER_ON ( )    P2DIR |= BIT7; P2OUT |= BIT7

Configure GPIO operation to be used when library wants to turn power on for 1-Wire bus pull-up resistor. This is optional. If not configured, it is assumed that pull-up is always powered.

§ OWCFG_POWER_OFF

#define OWCFG_POWER_OFF ( )    P2OUT &= ~BIT7

Configure GPIO operation to be used when library wants to turn power off for 1-Wire bus pull-up resistor. This is optional. If not configured, it is assumed that pull-up is always powered.

This can be used to save power in battery-powered systems.