Example #1
0
void macphy_clearbit(u8 reg, u8 val)
{
  /* CAUTION: You must set the proper bank before calling this routine */

  spi_ss(0);
  spi_txrx(CMD_BFC(reg));
  spi_txrx(val);
  spi_ss(1);
}
static void enc_bclr(enc_dev_t *enc, const u8 reg, const u8 data)
{
	u8 dout[2];

	dout[0] = CMD_BFC(reg);
	dout[1] = data;
	spi_xfer(enc->slave, 2 * 8, dout, NULL,
		SPI_XFER_BEGIN | SPI_XFER_END);
}