Multi Half-Bridge  4.0.0
Library of Infineon's Multi Half-Bridge IC controllers family
spic-wiced.hpp
Go to the documentation of this file.
1 
10 #ifndef SPIC_WICED_HPP_
11 #define SPIC_WICED_HPP_
12 
13 #include "spic.hpp"
14 #include <platform.h>
15 #include <wiced_platform.h>
16 
17 using namespace tle94112;
18 
28 class SPICWiced: virtual public SPIC
29 {
30  private:
31  wiced_gpio_t csPin;
32  wiced_gpio_t misoPin;
33  wiced_gpio_t mosiPin;
34  wiced_gpio_t sckPin;
35 
36  wiced_spi_t port;
37  wiced_spi_device_t spi;
38  uint8_t lsb;
39  uint8_t mode;
40  uint8_t clock;
41 
42  uint8_t sendBuffer[2];
43  uint8_t receiveBuffer[2];
44  bool spiSetting = false;
45 
46  //* @brief Definition of the SPI-Segment which contains the data for the communication
47  wiced_spi_message_segment_t segment;
48 
49  public:
50  SPICWiced();
51  SPICWiced(wiced_spi_t port, wiced_gpio_t csPin);
52  SPICWiced(wiced_spi_t port, wiced_gpio_t csPin, uint8_t speed, uint8_t mode, uint8_t bits);
53  ~SPICWiced();
54  Error_t init();
55  Error_t deinit();
56  Error_t transfer(uint8_t send, uint8_t &received);
57  Error_t transfer16(uint16_t send, uint16_t &received);
58 
59 };
62 #endif
Definition: spic.hpp:25
Error_t
Definition: tle94112-types.hpp:26
Wiced SPIC class.
Definition: spic-wiced.hpp:29
Definition: tle94112-types.hpp:14
TLE94112 SPI Platform Abstraction Layer.