X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=hw%2Fhw_mcp41.h;h=33e8f774fe60fc2d3660360cf90093f250a5350e;hb=HEAD;hp=d2ef6900720adad879d3b5f509d0e6d7d900fa9f;hpb=5f3952176a4e9a00ca8dd5ec4a6b994958f89e0a;p=bertos.git diff --git a/hw/hw_mcp41.h b/hw/hw_mcp41.h deleted file mode 100644 index d2ef6900..00000000 --- a/hw/hw_mcp41.h +++ /dev/null @@ -1,46 +0,0 @@ -/** - * \file - * - * - * \version $Id$ - * - * \brief MCP41 hardware-specific definitions - * - * \version $Id$ - * \author Francesco Sacchi - */ - -#ifndef HW_MCP41_H -#define HW_MCP41_H - -#include -#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. - */ -INLINE void SET_MCP41_DDR(Mcp41Dev dev) -{ - /* DDR port is 1 address before PORT */ - ATOMIC(_SFR_IO8(mcp41_ports[dev] - 1) |= mcp41_pins[dev]); -} - -INLINE void MCP41_ON(Mcp41Dev i) -{ - ATOMIC(_SFR_IO8(mcp41_ports[i]) &= ~mcp41_pins[i]); -} - -INLINE void MCP41_OFF(Mcp41Dev i) -{ - ATOMIC(_SFR_IO8(mcp41_ports[i]) |= mcp41_pins[i]); -} - - -#endif /* HW_MCP41_H */