ATMega168pb/ATMega168pb/dmx/include/port.h
/**
 * \brief Set PORTB data direction
 *
 * Select if the port pins selected by mask data direction is input, output
 * or disabled.
 *
 * \param[in] mask      Bit mask where 1 means apply direction setting to the
 *                      corresponding pin
 * \param[in] direction PORT_DIR_IN  = Data direction in
 *                      PORT_DIR_OUT = Data direction out
 *                      PORT_DIR_OFF = Disables the pin
 *                      (low power state)
 */
\brief Set PORTB data direction
Select if the port pins selected by mask data direction is input, output
or disabled.

\param[in] mask      Bit mask where 1 means apply direction setting to the
corresponding pin
\param[in] direction PORT_DIR_IN  = Data direction in
PORT_DIR_OUT = Data direction out
PORT_DIR_OFF = Disables the pin
(low power state)
\ brief Set PORTB data direction Select if the port pins selected by mask data direction is input output or disabled . \ param [ in ] mask Bit mask where 1 means apply direction setting to the corresponding pin \ param [ in ] direction PORT_DIR_IN = Data direction in PORT_DIR_OUT = Data direction out PORT_DIR_OFF = Disables the pin ( low power state )
static inline void PORTB_set_port_dir(const uint8_t mask, const enum port_dir direction)
{
	switch (direction) {
	case PORT_DIR_IN:
		DDRB &= ~mask;
		break;
	case PORT_DIR_OUT:
		DDRB |= mask;
		break;
	case PORT_DIR_OFF:
		DDRB &= ~mask;
		PORTB |= mask;
		break;
	default:
		break;
	}
}
static inline void PORTB_set_port_dir ( const uint8_t mask , const enum port_dir direction ) { switch ( direction ) { case PORT_DIR_IN : DDRB &= ~ mask ; break ; case PORT_DIR_OUT : DDRB |= mask ; break ; case PORT_DIR_OFF : DDRB &= ~ mask ; PORTB |= mask ; break ; default : break ; } }
\brief Set PORTB data direction
 Select if the port pins selected by mask data direction is input, output
 or disabled.
\ brief Set PORTB data direction Select if the port pins selected by mask data direction is input output or disabled .