Files
hsb/S - Software/0 - HSB MRTS Kathode-MCP/3 - Implementation/0 - Code/HAL/Platform/inc/spiDevice.h
mmi 83cce4ba74 Updates on the IODevice structure.
Display and Logger fully functional.
Keypad task completed - yet to be tested

git-svn-id: https://svn.vbchaos.nl/svn/hsb/trunk@219 05563f52-14a8-4384-a975-3d1654cca0fa
2017-09-28 14:30:36 +00:00

79 lines
2.6 KiB
C

// -----------------------------------------------------------------------------
/// @file spiDevice.h
/// @brief File description
// -----------------------------------------------------------------------------
// Micro-Key bv
// Industrieweg 28, 9804 TG Noordhorn
// Postbus 92, 9800 AB Zuidhorn
// The Netherlands
// Tel: +31 594 503020
// Fax: +31 594 505825
// Email: support@microkey.nl
// Web: www.microkey.nl
// -----------------------------------------------------------------------------
/// $Revision$
/// $Author$
/// $Date$
// (c) 2015 Micro-Key bv
// -----------------------------------------------------------------------------
/// @defgroup {group_name} {group_description}
/// Description
/// @file spiDevice.h
/// @ingroup {group_name}
#ifndef PLATFORM_INC_SPIDEVICE_H_
#define PLATFORM_INC_SPIDEVICE_H_
// -----------------------------------------------------------------------------
// Include files
// -----------------------------------------------------------------------------
#include "IODevice.h"
#include "spi.h"
// -----------------------------------------------------------------------------
// Constant and macro definitions
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
// Type definitions.
// -----------------------------------------------------------------------------
struct SpiDevice
{
struct IODevice device;
struct Spi* spi;
struct SpiParameters parameters;
T_PL_GPIO SPI_CE;
};
// -----------------------------------------------------------------------------
// Function declarations
// -----------------------------------------------------------------------------
extern ErrorStatus SpiDevice_construct(struct SpiDevice* self, struct Spi* spi, const struct SpiParameters* parameters, T_PL_GPIO SPI_CE);
/** ----------------------------------------------------------------------------
* Spi_Write
* Write the data in buffer to the SPI in argument self
*
* @param self The UART class object
* @param buffer Message string to send
* @parm length Message length
*
* @return ErrorStatus SUCCESS if writing message was successful
* ERROR otherwise
*
* @todo
* -----------------------------------------------------------------------------
*/
extern ErrorStatus SpiDevice_write (const struct SpiDevice* self, const char* buffer, int length);
#endif /* PLATFORM_INC_SPIDEVICE_H_ */