X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fhw%2Fhw_mcp41.h;h=33e8f774fe60fc2d3660360cf90093f250a5350e;hb=cdd85b7bd633a4256b1250dd4c0b8ead0cb37b62;hp=8dd6297ef9a6d12d6bc7ba7fa189ab918fc2b87a;hpb=791e167e053bdd9250d34a9a5ccae6ccde4d6679;p=bertos.git diff --git a/bertos/hw/hw_mcp41.h b/bertos/hw/hw_mcp41.h index 8dd6297e..33e8f774 100644 --- a/bertos/hw/hw_mcp41.h +++ b/bertos/hw/hw_mcp41.h @@ -29,8 +29,6 @@ * Copyright 2005 Develer S.r.l. (http://www.develer.com/) * --> * - * \version $Id$ - * * \brief MCP41 hardware-specific definitions * * \version $Id$ @@ -40,32 +38,38 @@ #ifndef HW_MCP41_H #define HW_MCP41_H -#include +#include "mcp41_map.h" + #include -#include -#include -extern const uint16_t mcp41_ports[MCP41_CNT]; -extern const uint8_t mcp41_pins[MCP41_CNT]; -/** - * Set MCP41 port associated with \a dev to output. - */ +#warning TODO:This is an example implementation, you must implement it! + + INLINE void SET_MCP41_DDR(Mcp41Dev dev) { - /* DDR port is 1 address before PORT */ - ATOMIC(_SFR_IO8(mcp41_ports[dev] - 1) |= mcp41_pins[dev]); + /* Implement me! */ + //Warning: this funtions is like avr target name, + //fix it to comply for all target. + + //Only for test remove when implement this function + (void)dev; } INLINE void MCP41_ON(Mcp41Dev i) { - ATOMIC(_SFR_IO8(mcp41_ports[i]) &= ~mcp41_pins[i]); + /* Implement me! */ + + //Only for test remove when implement this function + (void)i; } INLINE void MCP41_OFF(Mcp41Dev i) { - ATOMIC(_SFR_IO8(mcp41_ports[i]) |= mcp41_pins[i]); -} + /* Implement me! */ + //Only for test remove when implement this function + (void)i; +} #endif /* HW_MCP41_H */