fork download
  1. /* Microchip Technology Inc. and its subsidiaries. You may use this software
  2.  * and any derivatives exclusively with Microchip products.
  3.  *
  4.  * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS". NO WARRANTIES, WHETHER
  5.  * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED
  6.  * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A
  7.  * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION
  8.  * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION.
  9.  *
  10.  * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE,
  11.  * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND
  12.  * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS
  13.  * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE. TO THE
  14.  * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS
  15.  * IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF
  16.  * ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
  17.  *
  18.  * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE
  19.  * TERMS.
  20.  */
  21.  
  22. /*
  23.  * File:
  24.  * Author:
  25.  * Comments:
  26.  * Revision history:
  27.  */
  28.  
  29. // This is a guard condition so that contents of this file are not included
  30. // more than once.
  31. #ifndef XC_HEADER_TEMPLATE_H
  32. #define XC_HEADER_TEMPLATE_H
  33.  
  34. #include <xc.h>
  35.  
  36. #include "/system/pins.h" // include processor files - each processor file is guarded.
  37.  
  38. // TODO Insert appropriate #include <>
  39.  
  40. // TODO Insert C++ class definitions if appropriate
  41.  
  42. // TODO Insert declarations
  43. #define LCD_RS LCD_RS_LAT
  44. #define LCD_E LCD_E_LAT
  45. #define LCD_DB4 LCD_DB4_LAT
  46. #define LCD_DB5 LCD_DB5_LAT
  47. #define LCD_DB6 LCD_DB6_LAT
  48. #define LCD_DB7 LCD_DB7_LAT
  49.  
  50. void LCD_Port (char bits);
  51. void LCD_Command (char cmnd);
  52. void LCD_Char (char char_data);
  53. void LCD_Init (void);
  54. void LCD_Clear(void);
  55. void LCD_Goto_xy (char x, char y);
  56. void LCD_String (char *str);
  57. void LCD_String_xy (char row, char pos, char *str);
  58. // Comment a function and leverage automatic documentation with slash star star
  59. /**
  60.   <p><b>Function prototype:</b></p>
  61.  
  62.   <p><b>Summary:</b></p>
  63.  
  64.   <p><b>Description:</b></p>
  65.  
  66.   <p><b>Precondition:</b></p>
  67.  
  68.   <p><b>Parameters:</b></p>
  69.  
  70.   <p><b>Returns:</b></p>
  71.  
  72.   <p><b>Example:</b></p>
  73.   <code>
  74.  
  75.   </code>
  76.  
  77.   <p><b>Remarks:</b></p>
  78.  */
  79. // TODO Insert declarations or function prototypes (right here) to leverage
  80. // live documentation
  81.  
  82. #ifdef __cplusplus
  83. extern "C" {
  84. #endif /* __cplusplus */
  85.  
  86. // TODO If C++ is being used, regular C code needs function names to have C
  87. // linkage so the functions can be used by the c code.
  88.  
  89. #ifdef __cplusplus
  90. }
  91. #endif /* __cplusplus */
  92.  
  93. #endif /* XC_HEADER_TEMPLATE_H */
  94.  
Success #stdin #stdout 0.02s 25788KB
stdin
Standard input is empty
stdout
/* Microchip Technology Inc. and its subsidiaries.  You may use this software 
 * and any derivatives exclusively with Microchip products. 
 * 
 * THIS SOFTWARE IS SUPPLIED BY MICROCHIP "AS IS".  NO WARRANTIES, WHETHER 
 * EXPRESS, IMPLIED OR STATUTORY, APPLY TO THIS SOFTWARE, INCLUDING ANY IMPLIED 
 * WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY, AND FITNESS FOR A 
 * PARTICULAR PURPOSE, OR ITS INTERACTION WITH MICROCHIP PRODUCTS, COMBINATION 
 * WITH ANY OTHER PRODUCTS, OR USE IN ANY APPLICATION. 
 *
 * IN NO EVENT WILL MICROCHIP BE LIABLE FOR ANY INDIRECT, SPECIAL, PUNITIVE, 
 * INCIDENTAL OR CONSEQUENTIAL LOSS, DAMAGE, COST OR EXPENSE OF ANY KIND 
 * WHATSOEVER RELATED TO THE SOFTWARE, HOWEVER CAUSED, EVEN IF MICROCHIP HAS 
 * BEEN ADVISED OF THE POSSIBILITY OR THE DAMAGES ARE FORESEEABLE.  TO THE 
 * FULLEST EXTENT ALLOWED BY LAW, MICROCHIP'S TOTAL LIABILITY ON ALL CLAIMS 
 * IN ANY WAY RELATED TO THIS SOFTWARE WILL NOT EXCEED THE AMOUNT OF FEES, IF 
 * ANY, THAT YOU HAVE PAID DIRECTLY TO MICROCHIP FOR THIS SOFTWARE.
 *
 * MICROCHIP PROVIDES THIS SOFTWARE CONDITIONALLY UPON YOUR ACCEPTANCE OF THESE 
 * TERMS. 
 */

/* 
 * File:   
 * Author: 
 * Comments:
 * Revision history: 
 */

// This is a guard condition so that contents of this file are not included
// more than once.  
#ifndef XC_HEADER_TEMPLATE_H
#define	XC_HEADER_TEMPLATE_H

#include <xc.h>

#include "/system/pins.h" // include processor files - each processor file is guarded.  

// TODO Insert appropriate #include <>

// TODO Insert C++ class definitions if appropriate

// TODO Insert declarations
#define	 LCD_RS    LCD_RS_LAT
#define	 LCD_E     LCD_E_LAT
#define	 LCD_DB4   LCD_DB4_LAT
#define	 LCD_DB5   LCD_DB5_LAT
#define	 LCD_DB6   LCD_DB6_LAT
#define	 LCD_DB7   LCD_DB7_LAT

void LCD_Port (char bits);
void LCD_Command (char cmnd);
void LCD_Char (char char_data);
void LCD_Init (void);
void LCD_Clear(void);
void LCD_Goto_xy (char x, char y);
void LCD_String (char *str);
void LCD_String_xy (char row, char pos, char *str);
// Comment a function and leverage automatic documentation with slash star star
/**
    <p><b>Function prototype:</b></p>
  
    <p><b>Summary:</b></p>

    <p><b>Description:</b></p>

    <p><b>Precondition:</b></p>

    <p><b>Parameters:</b></p>

    <p><b>Returns:</b></p>

    <p><b>Example:</b></p>
    <code>
 
    </code>

    <p><b>Remarks:</b></p>
 */
// TODO Insert declarations or function prototypes (right here) to leverage 
// live documentation

#ifdef	__cplusplus
extern "C" {
#endif /* __cplusplus */

    // TODO If C++ is being used, regular C code needs function names to have C 
    // linkage so the functions can be used by the c code. 

#ifdef	__cplusplus
}
#endif /* __cplusplus */

#endif	/* XC_HEADER_TEMPLATE_H */