Merge pull request #1525 from LudwigOrtmann/morning-cleanup

doc, boards/cpu: cleanup
dev/timer
Ludwig Ortmann 9 years ago
commit 14e8abed05

@ -49,7 +49,6 @@ interrupt(USART1RX_VECTOR) usart0irq(void)
{
U1TCTL &= ~URXSE; /* Clear the URXS signal */
U1TCTL |= URXSE; /* Re-enable URXS - needed here?*/
int c = 0;
/* Check status register for receive errors. */
if(U1RCTL & RXERR) {
if (U1RCTL & FE) {
@ -65,11 +64,12 @@ interrupt(USART1RX_VECTOR) usart0irq(void)
puts("rx break error");
}
/* Clear error flags by forcing a dummy read. */
c = U1RXBUF;
volatile int c = U1RXBUF;
(void) c;
}
#ifdef MODULE_UART0
else if (uart0_handler_pid) {
c = U1RXBUF;
volatile int c = U1RXBUF;
uart0_handle_incoming(c);
uart0_notify_thread();
}

@ -14,12 +14,11 @@
void uart1_isr(void)
{
uint32_t i = 0;
if (UART1->USTATbits.RXRDY == 1) {
#ifdef MODULE_UART0
if (uart0_handler_pid) {
uint32_t i = 0;
while (UART1->RXCON != 0) {
uart0_handle_incoming(UART1->DATA);
@ -54,4 +53,4 @@ uint8_t uart1_getc(void)
}
return UART1->DATA;
}
}

@ -14,12 +14,11 @@
void uart2_isr(void)
{
uint32_t i = 0;
if (UART2->USTATbits.RXRDY == 1) {
#ifdef MODULE_UART0
if (uart0_handler_pid) {
uint32_t i = 0;
while (UART2->RXCON != 0) {
uart0_handle_incoming(UART2->DATA);
@ -54,4 +53,4 @@ uint8_t uart2_getc(void)
}
return UART2->DATA;
}
}

@ -83,8 +83,6 @@ void usart1irq(void);
*/
interrupt(USART1RX_VECTOR) usart1irq(void)
{
int c = 0;
/* Check status register for receive errors. */
if (U1RCTL & RXERR) {
if (U1RCTL & FE) {
@ -104,12 +102,13 @@ interrupt(USART1RX_VECTOR) usart1irq(void)
}
/* Clear error flags by forcing a dummy read. */
c = U1RXBUF;
volatile int c = U1RXBUF;
(void) c;
}
#ifdef MODULE_UART0
else if (uart0_handler_pid) {
c = U1RXBUF;
volatile int c = U1RXBUF;
uart0_handle_incoming(c);
uart0_notify_thread();
}

@ -38,6 +38,7 @@ int _gettimeofday(struct timeval *tp, void *restrict tzp)
#elif defined MODULE_VTIMER
vtimer_gettimeofday(tp);
#else
(void) tp;
__gettimeofday_syscall_is_not_implemented_without_vtimer_or_rtc_module();
#endif

@ -16,7 +16,6 @@
* @brief cc430 flashrom driver
*
* @author Kévin Roussel <Kevin.Roussel@inria.fr>
*
*/
#include <stddef.h>
@ -28,32 +27,44 @@ static uint8_t prepare(void);
static void finish(uint8_t istate);
static inline void busy_wait(void);
/*---------------------------------------------------------------------------*/
/**
* @TODO implement this function
*/
uint8_t flashrom_erase(uint8_t *addr)
{
// TODO implement this function
(void) addr;
return 0;
}
/*---------------------------------------------------------------------------*/
/**
* @TODO implement this function
*/
uint8_t flashrom_write(uint8_t *dst, const uint8_t *src, size_t size)
{
// TODO implement this function
(void) dst;
(void) src;
(void) size;
return 0;
}
/*---------------------------------------------------------------------------*/
/**
* @TODO implement this function
*/
static uint8_t prepare(void)
{
// TODO implement this function
return 0;
}
/*---------------------------------------------------------------------------*/
/**
* @TODO implement this function
*/
void finish(uint8_t istate)
{
// TODO implement this function
(void) istate;
}
/*---------------------------------------------------------------------------*/
static inline void busy_wait(void)
{
/* Wait for BUSY = 0, not needed unless run from RAM */

@ -1,11 +1,12 @@
/*
/**
* @defgroup flashrom Flash memory driver
* @ingroup drivers
* @brief Generic flash memory driver
* @{
*
* @file flashrom.h
* @file
*
* @brief Generic flash memory driver
* @author unknown
*/
@ -15,24 +16,25 @@
#include <stdint.h>
#include <stddef.h>
/*
/**
* @brief Erase sector
*
* @param addr Address within a flash sector to erase
* @param[out] addr Address within a flash sector to erase
*
* @return 1 on success, 0 otherwise
*/
uint8_t flashrom_erase(uint8_t *addr);
/* @brief Write buffer from ram to flash
/**
* @brief Write buffer from ram to flash
*
* @param dst Address within a flash sector to write, must be a 256 byte boundary
* @param src Address within ram, must be a word boundary
* @param size Bytes to write
* @param[out] dst Address within a flash sector to write, must be a 256 byte boundary
* @param[in] src Address within ram, must be a word boundary
* @param[in] size Bytes to write
*
* @return 1 on success, 0 otherwise
*/
uint8_t flashrom_write(uint8_t *dst, const uint8_t *src, size_t size);
/** @} */
#endif /* FLASHROM_H */
/** @} */

Loading…
Cancel
Save