mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Merge branch 'master' of github.com:RIOT-OS/boards
This commit is contained in:
commit
5b472cd310
@ -13,7 +13,7 @@ void hard_reset_to_bootloader(void)
|
||||
getchar();
|
||||
*/
|
||||
printf("Reset CPU (into bootloader)\r\n");
|
||||
set_rts(0); // RTS (ttl level) connects to P0.14
|
||||
set_rts(1); // RTS (ttl level) connects to P0.14
|
||||
/* the next two lines should be commented for the prepared node */
|
||||
set_dtr(1); // DTR (ttl level) connects to RST
|
||||
send_break_signal(); // or break detect circuit to RST
|
||||
@ -24,14 +24,14 @@ void hard_reset_to_bootloader(void)
|
||||
*/
|
||||
set_dtr(0); // allow the CPU to run:
|
||||
set_baud(baud_rate);
|
||||
set_rts(0); // set RTS again (as it has been reset by set_baudrate)
|
||||
set_rts(1); // set RTS again (as it has been reset by set_baudrate)
|
||||
usleep(40000);
|
||||
}
|
||||
|
||||
void hard_reset_to_user_code(void)
|
||||
{
|
||||
printf("Reset CPU (into user code)\r\n");
|
||||
set_rts(1); // RTS (ttl level) connects to P0.14
|
||||
et_rts(0); // RTS (ttl level) connects to P0.14
|
||||
set_dtr(1); // DTR (ttl level) connects to RST
|
||||
send_break_signal(); // or break detect circuit to RST
|
||||
usleep(75000);
|
||||
|
@ -1,12 +1,14 @@
|
||||
/**
|
||||
* Native Board config.h implementation
|
||||
*
|
||||
* No functionality implemented at the moment.
|
||||
*
|
||||
* Copyright (C) 2013 Ludwig Ortmann
|
||||
*
|
||||
* This file subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file LICENSE in the top level directory for more details.
|
||||
*
|
||||
* @ingroup native
|
||||
* @ingroup native_board
|
||||
* @{
|
||||
* @file
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
@ -18,12 +20,18 @@
|
||||
|
||||
#include <config.h>
|
||||
|
||||
/**
|
||||
* XXX: loading not implemented
|
||||
*/
|
||||
void config_load(void)
|
||||
{
|
||||
printf("XXX: config_load(): not implemented\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* XXX: storing not implemented
|
||||
*/
|
||||
uint8_t config_save(void)
|
||||
{
|
||||
printf("XXX: config_save(): not implemented - your config will vanish on process termination\n");
|
||||
|
@ -6,7 +6,7 @@
|
||||
* This file subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file LICENSE in the top level directory for more details.
|
||||
*
|
||||
* @ingroup native
|
||||
* @ingroup native_board
|
||||
* @{
|
||||
* @file
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
@ -15,6 +15,10 @@
|
||||
|
||||
#include "board.h"
|
||||
|
||||
/**
|
||||
* Nothing to initialize at the moment.
|
||||
* Turns the red LED on and the green LED off.
|
||||
*/
|
||||
void board_init()
|
||||
{
|
||||
LED_GREEN_OFF();
|
||||
|
@ -1,12 +1,14 @@
|
||||
/**
|
||||
* Native Board interface
|
||||
*
|
||||
* The native board uses call level hardware simulation.
|
||||
*
|
||||
* Copyright (C) 2013 Ludwig Ortmann
|
||||
*
|
||||
* This file subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file LICENSE in the top level directory for more details.
|
||||
*
|
||||
* @ingroup native
|
||||
* @defgroup native_board
|
||||
* @{
|
||||
* @file
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
|
@ -1,12 +1,14 @@
|
||||
/**
|
||||
* Native Board LED implementation
|
||||
*
|
||||
* Only prints function calls at the moment.
|
||||
*
|
||||
* Copyright (C) 2013 Ludwig Ortmann
|
||||
*
|
||||
* This file subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file LICENSE in the top level directory for more details.
|
||||
*
|
||||
* @ingroup native
|
||||
* @ingroup native_board
|
||||
* @{
|
||||
* @file
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
|
@ -1,16 +1,19 @@
|
||||
/**
|
||||
* Native Board ltc4150_arch.h implementation
|
||||
*
|
||||
* Only measures time at the moment. Uses POSIX real-time extension
|
||||
* timer to generate periodic signal/interrupt.
|
||||
*
|
||||
* Copyright (C) 2013 Ludwig Ortmann
|
||||
*
|
||||
* This file subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file LICENSE in the top level directory for more details.
|
||||
*
|
||||
* @ingroup native
|
||||
* @ingroup native_board
|
||||
* @ingroup ltc4150
|
||||
* @{
|
||||
* @file
|
||||
* @author Ludwig Ortmann <ludwig.ortmann@fu-berlin.de>
|
||||
* @}
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
@ -29,24 +32,36 @@
|
||||
static timer_t native_ltc4150_timer;
|
||||
static struct itimerspec native_ltc4150_timer_time;
|
||||
|
||||
/**
|
||||
* unregister signal handler
|
||||
*/
|
||||
void ltc4150_disable_int(void)
|
||||
{
|
||||
DEBUG("ltc4150_disable_int()\n");
|
||||
unregister_interrupt(_SIG_LTC4150);
|
||||
}
|
||||
|
||||
/**
|
||||
* register signal handler
|
||||
*/
|
||||
void ltc4150_enable_int(void)
|
||||
{
|
||||
DEBUG("ltc4150_enable_int()\n");
|
||||
register_interrupt(_SIG_LTC4150, ltc4150_interrupt);
|
||||
}
|
||||
|
||||
/**
|
||||
* elaborate nop
|
||||
*/
|
||||
void ltc4150_sync_blocking(void)
|
||||
{
|
||||
DEBUG("ltc4150_sync_blocking()\n");
|
||||
for(int i = native_ltc4150_startup_delay; i>0; i--);
|
||||
}
|
||||
|
||||
/**
|
||||
* set up posix real-time timer to simulate coloumb counter ticks
|
||||
*/
|
||||
void ltc4150_arch_init(void)
|
||||
{
|
||||
struct sigevent sev;
|
||||
@ -74,3 +89,4 @@ void ltc4150_arch_init(void)
|
||||
|
||||
puts("Native LTC4150 initialized.");
|
||||
}
|
||||
/** @} */
|
||||
|
Loading…
Reference in New Issue
Block a user