* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2009 Develer S.r.l. (http://www.develer.com/)
*
* -->
*
*
* \brief SIPO Module
*
- * The SIPO module trasform a serial input in
+ * The SIPO module transforms a serial input in
* a parallel output. Please check hw_sipo.h
- * file to customize hardware relative parameters.
+ * file to customize hardware related parameters.
*
+ * \author Andrea Grandi <andrea@develer.com>
* \author Daniele Basile <asterix@develer.com>
*/
}
/**
- * Write a buffer into sipo register and when finish to
- * we load it.
+ * Write a buffer into the sipo register and, when finished, give a load pulse.
*/
static size_t sipo_write(UNUSED_ARG(struct KFile *, fd), const void *_buf, size_t size)
{
size_t write_len = size;
ASSERT(buf);
- // Load into shift register all byte in buffer
+ // Load into the shift register all the buffer bytes
while(size--)
sipo_putchar(*buf++);
- // We finsh to load bytes into shift register, load it.
+ // We have just finished to shift the bytes into the register, now load them.
SIPO_LOAD();
return write_len;
memset(fd, 0, sizeof(Sipo));
- //Set kfile struct type as a generic kfile structure.
+ //Set kfile struct type as a Sipo structure.
DB(fd->fd._type = KFT_SIPO);
- // Set up data flash programming functions.
+ // Set up SIPO writing functions.
fd->fd.write = sipo_write;
SIPO_INIT_PIN();
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2008 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2009 Develer S.r.l. (http://www.develer.com/)
*
* -->
*
*
* \version $Id$
*
+ * \author Andrea Grandi <andrea@develer.com>
* \author Daniele Basile <asterix@develer.com>
*/
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2003, 2004, 2006, 2008 Develer S.r.l. (http://www.develer.com/)
- * Copyright 2000 Bernardo Innocenti <bernie@codewiz.org>
+ * Copyright 2003, 2004, 2006, 2008, 2009 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
* All Rights Reserved.
* -->
*
*
* \version $Id$
*
+ * \author Andrea Grandi <andrea@develer.com>
* \author Daniele Basile <asterix@develer.com>
*/
/**
- * Define the procedure to set one bit low/hight to
- * serial input in sipo device.
+ * Define the macros needed to set the serial input bit of SIPO device
+ * low or high.
*/
#define SIPO_SI_HIGH()/* Implement me! */
#define SIPO_SI_LOW() /* Implement me! */
/**
- * Do anything that needed to init sipo pins.
+ * Do everything needed in order to init the SIPO pins.
*/
#define SIPO_INIT_PIN() \
do { \
* invalidate any other reasons why the executable file might be covered by
* the GNU General Public License.
*
- * Copyright 2003, 2004, 2006 Develer S.r.l. (http://www.develer.com/)
+ * Copyright 2003, 2004, 2006, 2009 Develer S.r.l. (http://www.develer.com/)
* Copyright 2000 Bernie Innocenti <bernie@codewiz.org>
*
* -->
*
* \version $Id$
*
+ * \author Andrea Grandi <andrea@develer.com>
* \author Daniele Basile <asterix@develer.com>
*/
#define OE_LOW (PORTG &= BV(PG3))
/**
- * Define the procedure to set one bit low/hight to
- * serial input in sipo device.
+ * Define the macros needed to set the serial input bit of SIPO device
+ * low or high.
*/
#define SIPO_SI_HIGH() SOUT_OUT_HIGH
#define SIPO_SI_LOW() SOUT_OUT_LOW
/**
- * Do anything that needed to init sipo pins.
+ * Do everything needed in order to init the SIPO pins.
*/
#define SIPO_INIT_PIN() \
do { \
/* 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;