projects
/
bertos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
STM32: initialize the clock for all the peripherals at boot.
[bertos.git]
/
examples
/
triface
/
protocol.c
diff --git
a/examples/triface/protocol.c
b/examples/triface/protocol.c
index 156a414bc802983c28bc6a3f2d0f0ba43ba94497..eec73684520a0a61c55ca2932535959cfaf1cfbf 100644
(file)
--- a/
examples/triface/protocol.c
+++ b/
examples/triface/protocol.c
@@
-34,8
+34,6
@@
* \brief Implementation of the command protocol between the board and the host
*
*
* \brief Implementation of the command protocol between the board and the host
*
*
- * \version $Id$
- *
* \author Giovanni Bajo <rasky@develer.com>
* \author Marco Benelli <marco@develer.com>
* \author Bernie Innocenti <bernie@codewiz.org>
* \author Giovanni Bajo <rasky@develer.com>
* \author Marco Benelli <marco@develer.com>
* \author Bernie Innocenti <bernie@codewiz.org>
@@
-283,7
+281,7
@@
MAKE_CMD(ping, "", "",
/* Dout */
MAKE_CMD(dout, "d", "",
({
/* Dout */
MAKE_CMD(dout, "d", "",
({
- kfile_
write(&fd_sipo.fd, (uint8_t *)&args[1].l, 1
);
+ kfile_
putc((uint8_t)args[1].l, &fd_sipo.fd
);
//Store status of dout ports.
reg_status_dout = (uint8_t)args[1].l;
//Store status of dout ports.
reg_status_dout = (uint8_t)args[1].l;
@@
-360,6
+358,11
@@
static void protocol_registerCmds(void)
void protocol_init(KFile *fd)
{
/* SPI Port Initialization */
void protocol_init(KFile *fd)
{
/* SPI Port Initialization */
+ fd_sipo.load_device = TRIFACE_DOUT;
+ fd_sipo.bit_order = SIPO_DATAORDER_LSB;
+ fd_sipo.clock_pol = SIPO_START_LOW;
+ fd_sipo.load_pol = SIPO_LOW_TO_HIGH;
+
sipo_init(&fd_sipo);
interactive = FORCE_INTERACTIVE;
sipo_init(&fd_sipo);
interactive = FORCE_INTERACTIVE;