Exemple #1
0
void startup_init(void)
{
	INIT_SIGNAL_FOR_SPI();
	BUSY_FOR_SPI();

	// if DEBUG enabled use DEB_PIN_GPIO for debug purposes
    DEB_PIN_ENA();
	DEB_PIN_ENA(2);
    DEB_PIN_UP();
	DEB_PIN_UP(2);
}
Exemple #2
0
void sendError()
{
	AVAIL_FOR_SPI();
	if (spi_write(&AVR32_SPI, ERR_CMD) != SPI_ERROR_TIMEOUT)
	{
		//Wait to empty the buffer
		while(!spi_writeRegisterEmptyCheck(&AVR32_SPI));
	}
	BUSY_FOR_SPI();
	WARN("Send SPI error!\n");
}