Microchip® Advanced Software Framework

BitBangSPI_Master.c File Reference

BitBangSPI for Qtouch.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"
#include "BitBangSPI_Master.h"
#include "QDebugTransport.h"

Macros

#define CONCAT(A, B, C)   JOIN1( A, B, C )
 
#define JOIN1(A, B, C)   A ## B ## C
 
#define PORT   REG_PIO
 

Functions

void BitBangSPI_Master_Init (void)
 Initialize BitBangSPI Interface. More...
 
static uint8_t BitBangSPI_Send_Byte (uint8_t c)
 Send and Read one byte using BitBangSPI Interface. More...
 
void BitBangSPI_Send_Message (void)
 Send and Read one frame using BitBangSPI Interface. More...
 

#define CONCAT (   A,
  B,
 
)    JOIN1( A, B, C )
#define JOIN1 (   A,
  B,
 
)    A ## B ## C
#define PORT   REG_PIO

void BitBangSPI_Master_Init ( void  )

Initialize BitBangSPI Interface.

References CONCAT, MISO_BB, MOSI_BB, PORT, SCK_BB, and SPI_BB.

Referenced by QDebug_Init().

static uint8_t BitBangSPI_Send_Byte ( uint8_t  c)
static

Send and Read one byte using BitBangSPI Interface.

Parameters
cData to send to slave.
Returns
Data read from slave.

References CONCAT, DELAY1US, DELAY50US, MISO_BB, MOSI_BB, PORT, SCK_BB, and SPI_BB.

Referenced by BitBangSPI_Send_Message().

void BitBangSPI_Send_Message ( void  )

Send and Read one frame using BitBangSPI Interface.

References BitBangSPI_Send_Byte(), RxHandler(), TX_Buffer, and TX_index.

Referenced by Send_Message().