コード例 #1
0
ファイル: macphy.c プロジェクト: cristi85/uIP_ENC28J60
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);
}
コード例 #2
0
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);
}