示例#1
0
/*static inline*/ void enc_reset(void)
{
	enc_select();
	spi_put( ENC_SPI_OP_SC );
	enc_deselect();

	// errata #2: wait for at least 300 us
	usdelay( 1000 );
}
示例#2
0
static inline void enc_reset(void)
{
	enc_select();
	spi_put( ENC_SPI_OP_SC );
	enc_deselect();

	// errata #2: wait for at least 300 us
	_delay_ms(1);
}
示例#3
0
static void ICACHE_FLASH_ATTR enc_setbits_reg( u8 reg, u8 bits )
{
	// no automatic bank switching in this function !!!

	u8 addr = reg & ENC_REG_ADDR_MASK;

	enc_select();
  spi_transaction(SPI_USED, 8, (ENC_SPI_OP_BFS | addr), 0, 0, 8, bits, 0, 0);
	enc_deselect();
}
示例#4
0
static void enc_setbits_reg( unsigned char reg, unsigned char bits )
{
	// no automatic bank switching in this function !!!

	unsigned char addr = reg & ENC_REG_ADDR_MASK;

	enc_select();
	spi_put( ENC_SPI_OP_BFS | addr );
	spi_put( bits );
	enc_deselect();
}