2014-05-15 08:49:20 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2008-2009, Freie Universitaet Berlin
|
|
|
|
*
|
2014-07-31 19:45:27 +02:00
|
|
|
* This file is subject to the terms and conditions of the GNU Lesser
|
|
|
|
* General Public License v2.1. See the file LICENSE in the top level
|
|
|
|
* directory for more details.
|
2014-05-15 08:49:20 +02:00
|
|
|
*/
|
2010-09-22 15:10:42 +02:00
|
|
|
|
|
|
|
/**
|
2014-07-31 20:34:28 +02:00
|
|
|
* @ingroup msba2
|
|
|
|
* @ingroup ltc4150
|
2010-09-22 15:10:42 +02:00
|
|
|
* @{
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @file
|
2014-07-31 20:34:28 +02:00
|
|
|
* @brief LTC4150 MSB-A2 specific implemetation
|
2010-09-22 15:10:42 +02:00
|
|
|
*
|
2014-07-31 20:34:28 +02:00
|
|
|
* @author Heiko Will
|
|
|
|
* @author Michael Baar
|
2013-12-04 15:07:56 +01:00
|
|
|
* @author Kaspar Schleiser <kaspar@schleiser.de>
|
2010-09-22 15:10:42 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
#include "lpc2387.h"
|
|
|
|
#include "ltc4150_arch.h"
|
|
|
|
#include "gpioint.h"
|
|
|
|
|
2013-07-29 16:41:43 +02:00
|
|
|
void __attribute__((__no_instrument_function__)) ltc4150_disable_int(void)
|
|
|
|
{
|
|
|
|
gpioint_set(0, BIT4, GPIOINT_DISABLE, NULL);
|
2010-09-22 15:10:42 +02:00
|
|
|
}
|
|
|
|
|
2013-07-29 16:41:43 +02:00
|
|
|
void __attribute__((__no_instrument_function__)) ltc4150_enable_int(void)
|
|
|
|
{
|
|
|
|
gpioint_set(0, BIT4, GPIOINT_FALLING_EDGE, <c4150_interrupt);
|
2010-09-22 15:10:42 +02:00
|
|
|
}
|
|
|
|
|
2013-07-29 16:41:43 +02:00
|
|
|
void __attribute__((__no_instrument_function__)) ltc4150_sync_blocking(void)
|
|
|
|
{
|
|
|
|
while (!(FIO0PIN & BIT4)) {};
|
2010-09-22 15:10:42 +02:00
|
|
|
}
|
|
|
|
|
2014-05-07 12:36:32 +02:00
|
|
|
void __attribute__((__no_instrument_function__)) ltc4150_arch_init(void)
|
2013-07-29 16:41:43 +02:00
|
|
|
{
|
2010-09-22 15:10:42 +02:00
|
|
|
FIO0DIR |= BIT5;
|
2013-07-29 16:41:43 +02:00
|
|
|
FIO0SET = BIT5;
|
2010-09-22 15:10:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/** @} */
|