${disclaimer}

#ifndef BOOTLOADER_H
#define	BOOTLOADER_H

   
void BL_Initialize();

#define  INPUT_PIN   1
#define  OUTPUT_PIN  0

#define  ANALOG_PIN  1
#define  DIGITAL_PIN 0

#define  PPS_LOCKED   1
#define  PPS_UNLOCKED 0

#define  OPEN_DRAIN_ENABLED     1  // Enable Open Drain operation
#define  OPEN_DRAIN_DISABLE     0   // Regular operation


typedef union
{
    struct
    {
        uint8_t   LowByte;
        uint8_t   HighByte;
        uint8_t   UpperByte;
        uint8_t   ExtendedByte;
    };
    uint16_t  Address;
}address_t;

typedef struct
{
    address_t  Source_Address;
    address_t  Destination_Address;
    uint16_t   Length;
    uint8_t    Trigger;
    uint8_t    EE_Key_1;
    uint8_t    EE_Key_2;
    uint8_t    pad;
} BootBlock_t;

#define RUN_BOOTLOADER               0x55

#endif	/* BOOTLOADER_H */

