-//#include "sys_common.h"
-#include "ul_list.h"
-#include "drv_spi.h"
-#include "cpu_def.h"
+/* Copyright (C) 2012-2013, 2015 Czech Technical University in Prague
+ *
+ * This document contains proprietary information belonging to Czech
+ * Technical University in Prague. Passing on and copying of this
+ * document, and communication of its contents is not permitted
+ * without prior written authorization.
+ *
+ * File : spi.c
+ */
+
+//#include "ul/ul_list.h"
+//#include "drv/spi.h"
+//#include "cpu_def.h"
+//#include "ul/ul_list.h"
+#include "drv/spi.h"
int spi_msg_rq_ins(spi_drv_t *ifc, spi_msg_head_t *msg)
{
int spi_transfer_callback(struct spi_drv *ifc, int code, struct spi_msg_head *msg)
{
- if (msg->private) {
+ if (msg->private)
msg->private = 0;
- }
return 0;
}
return -1;
/* Wait for the request completion */
- while (msg.private) {
+ while (msg.private)
__memory_barrier();
- }
if (msg.flags & (SPI_MSG_FAIL | SPI_MSG_ABORT))
return msg.rq_len;
}
-