/*
   Copyright (c) 2018-2022 by Plexim GmbH
   All rights reserved.

   A free license is granted to anyone to use this software for any legal
   non safety-critical purpose, including commercial applications, provided
   that:
   1) IT IS NOT USED TO DIRECTLY OR INDIRECTLY COMPETE WITH PLEXIM, and
   2) THIS COPYRIGHT NOTICE IS PRESERVED in its entirety.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
   AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
   OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
   SOFTWARE.
 */

#ifndef _INCLUDES_H_
#define _INCLUDES_H_

#if !defined(_PLEXIM_) || !defined(CPU1)
#error Incorrect project settings!
#endif

#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>

#define TARGET_28004x

#include "f28004x_device.h"
#include "f28004x_sysctrl.h"
#include "f28004x_epwm_defines.h"
#include "f28004x_pie_defines.h"
#include "f28004x_gpio_defines.h"
#include "f28004x_cputimervars.h"
#include "f28004x_globalprototypes.h"
#include "f28004x_adc.h"
#include "f28004x_adc_defines.h"

#include "pil.h"
#include "plx_hal.h"

#include <stdio.h>

#define THIS_TSP_VER 0x0202

#define PLX_ASSERT(x) do {\
   if(!(x)){\
      asm("        ESTOP0");\
      for(;;);\
   }\
} while(0)

#ifndef BUILD_HAL

#if defined(SCI_BAUD_RATE) && defined(SCI_PORT)
#define SCI_CONFIGURED
#endif

#define PARALLEL_COM_BUF_ADDR 0x00BF00
#define PARALLEL_COM_BUF_LEN 0x80

#endif // BUILD_HAL
#endif // INCLUDES_H_
