precision-converters-firmware
Macros | Functions | Variables
app_config.h File Reference
#include <stdint.h>
#include <limits.h>
#include "app_config_mbed.h"
Include dependency graph for app_config.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MBED_PLATFORM   1
 
#define CONTINUOUS_DATA_CAPTURE   0
 
#define BURST_DATA_CAPTURE   1
 
#define XSTR(s)   #s
 
#define STR(s)   XSTR(s)
 
#define DEV_AD2S1210
 
#define ACTIVE_DEVICE   ID_AD2S1210
 
#define ACTIVE_DEVICE_NAME   "ad2s1210"
 
#define DEVICE_NAME   "DEV_AD2S1210"
 
#define ACTIVE_PLATFORM   MBED_PLATFORM
 
#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE
 
#define USE_VIRTUAL_COM_PORT
 
#define HW_CARRIER_NAME   TARGET_NAME
 
#define pwm_extra_init_params   mbed_pwm_extra_init_params
 
#define uart_extra_init_params   mbed_uart_extra_init_params
 
#define vcom_extra_init_params   mbed_vcom_extra_init_params
 
#define spi_extra_init_params   mbed_spi_extra_init_params
 
#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params
 
#define trigger_gpio_extra_init_params   mbed_trigger_gpio_extra_init_params
 
#define trigger_gpio_ops   mbed_gpio_ops
 
#define irq_ops   mbed_gpio_irq_ops
 
#define gpio_ops   mbed_gpio_ops
 
#define spi_ops   mbed_spi_ops
 
#define uart_ops   mbed_uart_ops
 
#define vcom_ops   mbed_virtual_com_ops
 
#define pwm_ops   mbed_pwm_ops
 
#define trigger_gpio_irq_ops   mbed_gpio_irq_ops
 
#define trigger_gpio_handle   0 /* Unused macro */
 
#define IRQ_INT_ID   GPIO_IRQ_ID1
 
#define TRIGGER_GPIO_PORT   0 /* Unused macro */
 
#define TRIGGER_GPIO_PIN   PWM_TRIGGER
 
#define TRIGGER_INT_ID   GPIO_IRQ_ID1
 
#define HW_MEZZANINE_NAME   "EVAL-AD2S1210SDZ"
 
#define HW_NAME   "ad2s1210"
 
#define HW_VENDOR   "Analog Devices"
 
#define NUM_CTX_ATTR   4
 
#define RESOLVER_CHANNELS   3
 
#define RESOLVER_MAX_ATTR   10
 
#define RESOLVER_MAX_COUNT_UNIPOLAR   (uint32_t)(USHRT_MAX)
 
#define RESOLVER_MAX_COUNT_BIPOLAR   (uint32_t)(SHRT_MAX)
 
#define AD2S1210_RESOLUTION   AD2S1210_RES_16BIT
 
#define AD2S1210_FCLKIN   8192000
 
#define MATH_PI   3.1415926f
 
#define AD2S1210_POS_IIO_SCALE   (2 * MATH_PI / RESOLVER_MAX_COUNT_UNIPOLAR)
 
#define AD2S1210_TRACKING_RATE_10BIT   2500
 
#define AD2S1210_TRACKING_RATE_12BIT   1000
 
#define AD2S1210_TRACKING_RATE_14BIT   500
 
#define AD2S1210_TRACKING_RATE_16BIT   125
 
#define FIRMWARE_NAME   "ad2s1210_iio"
 
#define PLATFORM_NAME   HW_CARRIER_NAME
 
#define VIRTUAL_COM_PORT_VID   0x0456
 
#define VIRTUAL_COM_PORT_PID   0xb66c
 
#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))
 
#define CONSOLE_STDIO_PORT_AVAILABLE
 
#define IIO_UART_BAUD_RATE   (230400)
 

Functions

int32_t init_system (void)
 Initialize the system peripherals. More...
 
int32_t init_pwm_trigger (void)
 Initialize the PWM trigger contoller. More...
 

Variables

struct no_os_uart_desc * uart_desc
 
struct no_os_irq_ctrl_desc * trigger_irq_desc
 

Macro Definition Documentation

◆ ACTIVE_DEVICE

#define ACTIVE_DEVICE   ID_AD2S1210

◆ ACTIVE_DEVICE_NAME

#define ACTIVE_DEVICE_NAME   "ad2s1210"

◆ ACTIVE_PLATFORM

#define ACTIVE_PLATFORM   MBED_PLATFORM

◆ AD2S1210_FCLKIN

#define AD2S1210_FCLKIN   8192000

◆ AD2S1210_POS_IIO_SCALE

#define AD2S1210_POS_IIO_SCALE   (2 * MATH_PI / RESOLVER_MAX_COUNT_UNIPOLAR)

◆ AD2S1210_RESOLUTION

#define AD2S1210_RESOLUTION   AD2S1210_RES_16BIT

◆ AD2S1210_TRACKING_RATE_10BIT

#define AD2S1210_TRACKING_RATE_10BIT   2500

◆ AD2S1210_TRACKING_RATE_12BIT

#define AD2S1210_TRACKING_RATE_12BIT   1000

◆ AD2S1210_TRACKING_RATE_14BIT

#define AD2S1210_TRACKING_RATE_14BIT   500

◆ AD2S1210_TRACKING_RATE_16BIT

#define AD2S1210_TRACKING_RATE_16BIT   125

◆ BURST_DATA_CAPTURE

#define BURST_DATA_CAPTURE   1

◆ CONSOLE_STDIO_PORT_AVAILABLE

#define CONSOLE_STDIO_PORT_AVAILABLE

◆ CONTINUOUS_DATA_CAPTURE

#define CONTINUOUS_DATA_CAPTURE   0

◆ DATA_CAPTURE_MODE

#define DATA_CAPTURE_MODE   CONTINUOUS_DATA_CAPTURE

◆ DEV_AD2S1210

#define DEV_AD2S1210

◆ DEVICE_NAME

#define DEVICE_NAME   "DEV_AD2S1210"

◆ FIRMWARE_NAME

#define FIRMWARE_NAME   "ad2s1210_iio"

◆ gpio_ops

#define gpio_ops   mbed_gpio_ops

◆ HW_CARRIER_NAME

#define HW_CARRIER_NAME   TARGET_NAME

◆ HW_MEZZANINE_NAME

#define HW_MEZZANINE_NAME   "EVAL-AD2S1210SDZ"

◆ HW_NAME

#define HW_NAME   "ad2s1210"

◆ HW_VENDOR

#define HW_VENDOR   "Analog Devices"

◆ IIO_UART_BAUD_RATE

#define IIO_UART_BAUD_RATE   (230400)

◆ IRQ_INT_ID

#define IRQ_INT_ID   GPIO_IRQ_ID1

◆ irq_ops

#define irq_ops   mbed_gpio_irq_ops

◆ MATH_PI

#define MATH_PI   3.1415926f

◆ MBED_PLATFORM

#define MBED_PLATFORM   1

◆ NUM_CTX_ATTR

#define NUM_CTX_ATTR   4

◆ PLATFORM_NAME

#define PLATFORM_NAME   HW_CARRIER_NAME

◆ pwm_extra_init_params

#define pwm_extra_init_params   mbed_pwm_extra_init_params

◆ pwm_ops

#define pwm_ops   mbed_pwm_ops

◆ RESOLVER_CHANNELS

#define RESOLVER_CHANNELS   3

◆ RESOLVER_MAX_ATTR

#define RESOLVER_MAX_ATTR   10

◆ RESOLVER_MAX_COUNT_BIPOLAR

#define RESOLVER_MAX_COUNT_BIPOLAR   (uint32_t)(SHRT_MAX)

◆ RESOLVER_MAX_COUNT_UNIPOLAR

#define RESOLVER_MAX_COUNT_UNIPOLAR   (uint32_t)(USHRT_MAX)

◆ spi_extra_init_params

#define spi_extra_init_params   mbed_spi_extra_init_params

◆ spi_ops

#define spi_ops   mbed_spi_ops

◆ STR

#define STR (   s)    XSTR(s)

◆ trigger_gpio_extra_init_params

#define trigger_gpio_extra_init_params   mbed_trigger_gpio_extra_init_params

◆ trigger_gpio_handle

#define trigger_gpio_handle   0 /* Unused macro */

◆ trigger_gpio_irq_extra_params

#define trigger_gpio_irq_extra_params   mbed_trigger_gpio_irq_init_params

◆ trigger_gpio_irq_ops

#define trigger_gpio_irq_ops   mbed_gpio_irq_ops

◆ trigger_gpio_ops

#define trigger_gpio_ops   mbed_gpio_ops

◆ TRIGGER_GPIO_PIN

#define TRIGGER_GPIO_PIN   PWM_TRIGGER

◆ TRIGGER_GPIO_PORT

#define TRIGGER_GPIO_PORT   0 /* Unused macro */

◆ TRIGGER_INT_ID

#define TRIGGER_INT_ID   GPIO_IRQ_ID1

◆ uart_extra_init_params

#define uart_extra_init_params   mbed_uart_extra_init_params

◆ uart_ops

#define uart_ops   mbed_uart_ops

◆ USE_VIRTUAL_COM_PORT

#define USE_VIRTUAL_COM_PORT

◆ vcom_extra_init_params

#define vcom_extra_init_params   mbed_vcom_extra_init_params

◆ vcom_ops

#define vcom_ops   mbed_virtual_com_ops

◆ VIRTUAL_COM_PORT_PID

#define VIRTUAL_COM_PORT_PID   0xb66c

◆ VIRTUAL_COM_PORT_VID

#define VIRTUAL_COM_PORT_VID   0x0456

◆ VIRTUAL_COM_SERIAL_NUM

#define VIRTUAL_COM_SERIAL_NUM   (FIRMWARE_NAME "_" DEVICE_NAME "_" STR(PLATFORM_NAME))

◆ XSTR

#define XSTR (   s)    #s

Function Documentation

◆ init_pwm_trigger()

int32_t init_pwm_trigger ( void  )

Initialize the PWM trigger contoller.

Returns
0 in case of success, negative error code otherwise

Initialize the PWM trigger contoller.

Returns
0 in case of success, negative error code otherwise.

◆ init_system()

int32_t init_system ( void  )

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise

Initialize the system peripherals.

Returns
0 in case of success, negative error code otherwise.

This function initializes system peripherals for the application

Returns
- 0 in case of success, negative error code otherwise

Variable Documentation

◆ trigger_irq_desc

struct no_os_irq_ctrl_desc* trigger_irq_desc
extern

◆ uart_desc

struct no_os_uart_desc* uart_desc
extern