src/ENC28J60.c
static int8_t tx_buf_init(struct enc28j60_dev *priv,
                          uint16_t start, uint16_t end) {
    if ((start > 0x1FFF) || (end > 0x1FFF) || (start > end)) {
        printf_P(PSTR("tx_buf_init(%d, %d) - TX buf bad parameters!\n"), start, end);
        // errno
        return -1;
    }

    wcr(priv, ENC28J60_ETXSTL, (uint8_t)start);
    wcr(priv, ENC28J60_ETXSTH, (uint8_t)(start >> 8));

    wcr(priv, ENC28J60_ETXNDL, (uint8_t)end);
    wcr(priv, ENC28J60_ETXNDH, (uint8_t)(end >> 8));

    return 0;
}
/*!
 * @brief TX buffer initialize.
 * ETXST and ETXND will not be changed after transmit operation.
 * @param start Start address of TX buffer
 * @param end End address of TX buffer
 * @return 0 if success; errno if error
 */
@brief TX buffer initialize.
ETXST and ETXND will not be changed after transmit operation.
@param start Start address of TX buffer
@param end End address of TX buffer
@return 0 if success; errno if error
@brief TX buffer initialize . ETXST and ETXND will not be changed after transmit operation . @param start Start address of TX buffer @param end End address of TX buffer @return 0 if success ; errno if error
static int8_t tx_buf_init(struct enc28j60_dev *priv,
                          uint16_t start, uint16_t end) {
    if ((start > 0x1FFF) || (end > 0x1FFF) || (start > end)) {
        printf_P(PSTR("tx_buf_init(%d, %d) - TX buf bad parameters!\n"), start, end);
        return -1;
    }
    wcr(priv, ENC28J60_ETXSTL, (uint8_t)start);
    wcr(priv, ENC28J60_ETXSTH, (uint8_t)(start >> 8));
    wcr(priv, ENC28J60_ETXNDL, (uint8_t)end);
    wcr(priv, ENC28J60_ETXNDH, (uint8_t)(end >> 8));
    return 0;
}
static int8_t tx_buf_init ( struct enc28j60_dev * priv , uint16_t start , uint16_t end ) { if ( ( start > 0x1FFF ) || ( end > 0x1FFF ) || ( start > end ) ) { printf_P ( PSTR ( " \n " ) , start , end ) ; return -1 ; } wcr ( priv , ENC28J60_ETXSTL , ( uint8_t ) start ) ; wcr ( priv , ENC28J60_ETXSTH , ( uint8_t ) ( start >> 8 ) ) ; wcr ( priv , ENC28J60_ETXNDL , ( uint8_t ) end ) ; wcr ( priv , ENC28J60_ETXNDH , ( uint8_t ) ( end >> 8 ) ) ; return 0 ; }
@brief TX buffer initialize.
@brief TX buffer initialize .
// errno