src/ENC28J60.c
static void phy_write(const struct enc28j60_dev *priv,
                      uint8_t reg, uint16_t data) {
    wcr(priv, ENC28J60_MIREGADR, reg);
    wcr(priv, ENC28J60_MIWRL, (uint8_t)(data & 0xFF));
    wcr(priv, ENC28J60_MIWRH, (uint8_t)(data >> 8));  // starting write
    _delay_us(10.24);
    while (rcr(priv, ENC28J60_MISTAT) & _BV(BUSY)) {}
}
/*!
 * @brief Writing PHY register.
 * @param reg PHY Register Address
 * @param data 16-bit write data
 */
@brief Writing PHY register.
@param reg PHY Register Address
@param data 16-bit write data
@brief Writing PHY register . @param reg PHY Register Address @param data 16 - bit write data
static void phy_write(const struct enc28j60_dev *priv,
                      uint8_t reg, uint16_t data) {
    wcr(priv, ENC28J60_MIREGADR, reg);
    wcr(priv, ENC28J60_MIWRL, (uint8_t)(data & 0xFF));
    wcr(priv, ENC28J60_MIWRH, (uint8_t)(data >> 8));  
    _delay_us(10.24);
    while (rcr(priv, ENC28J60_MISTAT) & _BV(BUSY)) {}
}
static void phy_write ( const struct enc28j60_dev * priv , uint8_t reg , uint16_t data ) { wcr ( priv , ENC28J60_MIREGADR , reg ) ; wcr ( priv , ENC28J60_MIWRL , ( uint8_t ) ( data & 0xFF ) ) ; wcr ( priv , ENC28J60_MIWRH , ( uint8_t ) ( data >> 8 ) ) ; _delay_us ( 10.24 ) ; while ( rcr ( priv , ENC28J60_MISTAT ) & _BV ( BUSY ) ) { } }
@brief Writing PHY register.
@brief Writing PHY register .
// starting write