10.1 C Header Code

configure.h

/* 
 * File:   configure.h
 * Author: Microchip Technology Inc.
 *
 * Created on September 20, 2018, 11:00 AM
 */
  
#ifndef CONFIGURE_H
#define CONFIGURE_H
  
#ifdef __cplusplus
extern "C" {
#endif
  
void initializePeripherals();
  
#ifdef __cplusplus
}
#endif
  
#endif  /* CONFIGURE_H */

memutil.h

/* 
 * File:   memutil.h
 * Author: Microchip Technology Inc.
 *
 * Created on September 19, 2018, 1:03 PM
 */
  
#ifndef MEMUTIL_H
#define MEMUTIL_H
  
#ifdef __cplusplus
extern "C" {
#endif
  
#define LEN(a) (sizeof(a) / sizeof(*a))
  
#ifdef __cplusplus
}
#endif
  
#endif /* MEMUTIL_H */

pins.h

/* 
 * File:   pins.h
 * Author: Microchip Technology Inc.
 *
 * Created on September 19, 2018, 11:22 AM
 */
  
#ifndef PINS_H
#define PINS_H
  
#ifdef __cplusplus
extern "C" {
#endif
  
#define MISO_PIN  5
#define MOSI_PIN  4
#define CS_PIN  3
#define SCK_PIN  6
  
#ifdef __cplusplus
}
#endif
  
#endif  /* PINS_H */

spi.h

/* 
 * File:   spi.h
 * Author: Microchip Technology Inc.
 *
 * Created on September 19, 2018, 11:21 AM
 */
  
#ifndef SPI_H
#define SPI_H
  
#ifdef __cplusplus
extern "C" {
#endif
  
void init_spi0(void);
  
void select_dgi_spi(void);
void deselect_dgi_spi(void);
void tx_spi0(uint8_t tx_usart1);
void tx_string_spi0(char* tx_string);
void tx_data_spi0(uint8_t tx_byte[], int length);
  
#ifdef __cplusplus
}
#endif
  
#endif  /* SPI_H */

timer_callback.h

/* 
 * File:   timer_callback.h
 * Author: Microchip Technology Inc.
 *
 * Created on September 19, 2018, 11:15 AM
 */
  
#ifndef TIMER_CALLBACK_H
#define TIMER_CALLBACK_H
  
#ifdef __cplusplus
extern "C" {
#endif
  
void timer_callback();
  
#ifdef __cplusplus
}
#endif
  
#endif  /* TIMER_CALLBACK_H */