nuttx/arch/arm/src/calypso/calypso_power.c
2013-07-01 08:11:54 -06:00

19 lines
286 B
C

#include <stdio.h>
#include <nuttx/spi/spi.h>
int board_power_off(void)
{
uint16_t tx;
struct spi_dev_s *spi = up_spiinitialize(0);
SPI_SETBITS(spi, 16);
tx = (1 << 6) | (1 << 1);
SPI_SNDBLOCK(spi, &tx, 1);
tx = (1 << 6) | (30 << 1);
SPI_SNDBLOCK(spi, &tx, 1);
return 0;
}