/**
  @Generated Pin Manager Header File

  @Company:
    Microchip Technology Inc.

  @File Name:
    pin_manager.h

  @Summary:
    This is the Pin Manager file generated using PIC10 / PIC12 / PIC16 / PIC18 MCUs

  @Description
    This header file provides APIs for driver for .
    Generation Information :
        Product Revision  :  PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.77
        Device            :  PIC18F25Q10
        Driver Version    :  2.11
    The generated drivers are tested against the following:
        Compiler          :  XC8 2.05 and above
        MPLAB 	          :  MPLAB X 5.20	
*/

/*
    (c) 2018 Microchip Technology Inc. and its subsidiaries. 
    
    Subject to your compliance with these terms, you may use Microchip software and any 
    derivatives exclusively with Microchip products. It is your responsibility to comply with third party 
    license terms applicable to your use of third party software (including open source software) that 
    may accompany Microchip software.
    
    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.
    
    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.
*/

#ifndef PIN_MANAGER_H
#define PIN_MANAGER_H

/**
  Section: Included Files
*/

#include <xc.h>

#define INPUT   1
#define OUTPUT  0

#define HIGH    1
#define LOW     0

#define ANALOG      1
#define DIGITAL     0

#define PULL_UP_ENABLED      1
#define PULL_UP_DISABLED     0

// get/set btn_pin aliases
#define btn_pin_TRIS                 TRISBbits.TRISB3
#define btn_pin_LAT                  LATBbits.LATB3
#define btn_pin_PORT                 PORTBbits.RB3
#define btn_pin_WPU                  WPUBbits.WPUB3
#define btn_pin_OD                   ODCONBbits.ODCB3
#define btn_pin_ANS                  ANSELBbits.ANSELB3
#define btn_pin_SetHigh()            do { LATBbits.LATB3 = 1; } while(0)
#define btn_pin_SetLow()             do { LATBbits.LATB3 = 0; } while(0)
#define btn_pin_Toggle()             do { LATBbits.LATB3 = ~LATBbits.LATB3; } while(0)
#define btn_pin_GetValue()           PORTBbits.RB3
#define btn_pin_SetDigitalInput()    do { TRISBbits.TRISB3 = 1; } while(0)
#define btn_pin_SetDigitalOutput()   do { TRISBbits.TRISB3 = 0; } while(0)
#define btn_pin_SetPullup()          do { WPUBbits.WPUB3 = 1; } while(0)
#define btn_pin_ResetPullup()        do { WPUBbits.WPUB3 = 0; } while(0)
#define btn_pin_SetPushPull()        do { ODCONBbits.ODCB3 = 0; } while(0)
#define btn_pin_SetOpenDrain()       do { ODCONBbits.ODCB3 = 1; } while(0)
#define btn_pin_SetAnalogMode()      do { ANSELBbits.ANSELB3 = 1; } while(0)
#define btn_pin_SetDigitalMode()     do { ANSELBbits.ANSELB3 = 0; } while(0)

// get/set led_pin aliases
#define led_pin_TRIS                 TRISBbits.TRISB4
#define led_pin_LAT                  LATBbits.LATB4
#define led_pin_PORT                 PORTBbits.RB4
#define led_pin_WPU                  WPUBbits.WPUB4
#define led_pin_OD                   ODCONBbits.ODCB4
#define led_pin_ANS                  ANSELBbits.ANSELB4
#define led_pin_SetHigh()            do { LATBbits.LATB4 = 1; } while(0)
#define led_pin_SetLow()             do { LATBbits.LATB4 = 0; } while(0)
#define led_pin_Toggle()             do { LATBbits.LATB4 = ~LATBbits.LATB4; } while(0)
#define led_pin_GetValue()           PORTBbits.RB4
#define led_pin_SetDigitalInput()    do { TRISBbits.TRISB4 = 1; } while(0)
#define led_pin_SetDigitalOutput()   do { TRISBbits.TRISB4 = 0; } while(0)
#define led_pin_SetPullup()          do { WPUBbits.WPUB4 = 1; } while(0)
#define led_pin_ResetPullup()        do { WPUBbits.WPUB4 = 0; } while(0)
#define led_pin_SetPushPull()        do { ODCONBbits.ODCB4 = 0; } while(0)
#define led_pin_SetOpenDrain()       do { ODCONBbits.ODCB4 = 1; } while(0)
#define led_pin_SetAnalogMode()      do { ANSELBbits.ANSELB4 = 1; } while(0)
#define led_pin_SetDigitalMode()     do { ANSELBbits.ANSELB4 = 0; } while(0)

/**
   @Param
    none
   @Returns
    none
   @Description
    GPIO and peripheral I/O initialization
   @Example
    PIN_MANAGER_Initialize();
 */
void PIN_MANAGER_Initialize (void);

/**
 * @Param
    none
 * @Returns
    none
 * @Description
    Interrupt on Change Handling routine
 * @Example
    PIN_MANAGER_IOC();
 */
void PIN_MANAGER_IOC(void);



#endif // PIN_MANAGER_H
/**
 End of File
*/