Example #1
0
int spi_master_write(spi_t *obj, int value) {
    ssp_write(obj, value);
    return ssp_read(obj);
}
Example #2
0
int spi_master_write(spi_t *obj, int value) {
    ssp_write(obj, value);
    while (obj->spi->SR & SSP_SR_BSY_Msk);  /* Wait for send to finish      */
    return (ssp_read(obj));
}