This repository has been archived on 2024-01-25. You can view files and clone it, but cannot push or open issues or pull requests.
Solar-Panel/lcd/lcd.h
2023-03-09 16:08:27 +01:00

60 lines
1.9 KiB
C

/* 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 LCD_H
#define LCD_H
#include <xc.h> // include processor files - each processor file is guarded.
// 2x16 character definitions
#define LCD_RS LATDbits.LATD3
#define DIR_LCD_RS TRISDbits.TRISD3
#define LCD_CS LATDbits.LATD2
#define DIR_LCD_CS TRISDbits.TRISD2
#define LCD_DATA_L_DIR TRISJ
#define LCD_DATA_L LATJ
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
int8_t Lcd_Init(void);
void LCD_2x16_WriteCmd(uint8_t command);
void LCD_2x16_WriteData(uint8_t command);
void LCD_2x16_WriteMsg(unsigned char * msg, uint8_t line);
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* LCD_H */