#ifndef SPI_H
#define SPI_H

#include <stdio.h>
#include <inttypes.h>
#include "driver/gpio.h"
#include "driver/spi_master.h"
#include "esp_log.h"
#include "esp_system.h"

#define VSPI_MISO   47
#define VSPI_MOSI   33
#define VSPI_SCLK   36



void spi_init();
esp_err_t spi_send_sync_fullduplex(const uint8_t *tx_data, uint8_t *rx_data, size_t len);
esp_err_t spi_send_data_8(uint8_t data);

extern spi_device_handle_t spi2;


#endif /* SPI_H */