Hilscher netX microcontroller driver  V0.0.5.0
Documentation of the netX driver package
netx_drv_biss.h File Reference

Header file of BISS controller module. More...

#include "netx_drv.h"
#include <stdint.h>
#include <stdbool.h>
Include dependency graph for netx_drv_biss.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  CYCLE_T
 
struct  DRV_BISSM_CFG_T
 
struct  DRV_BISSM_STATE_T
 
struct  DRV_BISSM_CTRL_STATE_T
 

Macros

#define HW_PTR_BISS(var)
 
#define HW_PTR_BISS_CTRL(var)
 

Enumerations

enum  DRV_BISSM_CFG_IF_E {
  DRV_BISSM_CFG_IF_DEFAULT = 0,
  DRV_BISSM_CFG_IF_DISABLE_CDS,
  DRV_BISSM_CFG_IF_SSI
}
 
enum  DRV_BISSM_IRQ_E {
  DRV_BISSM_IRQ_DATA = 0x01,
  DRV_BISSM_IRQ_RESET = 0x02,
  DRV_BISSM_IRQ_CTRL = 0x04
}
 
enum  DRV_BISSM_PARAM_E {
  DRV_BISSM_PARAM_CFG_IF = 0,
  DRV_BISSM_PARAM_PERIOD,
  DRV_BISSM_PARAM_CYCLE_TIME,
  DRV_BISSM_PARAM_BUSY_TIME,
  DRV_BISSM_PARAM_CTRL_TIMEOUT,
  DRV_BISSM_PARAM_IRQ_MASK,
  DRV_BISSM_PARAM_SSI_TSAR,
  DRV_BISSM_PARAM_TRGCFG,
  DRV_BISSM_PARAM_TRGMAN
}
 
enum  DRV_BISSM_DATA_ACTIVE_E {
  DRV_BISSM_DATA_ACTIVE_INACTIVE = 0,
  DRV_BISSM_DATA_ACTIVE_ACTIVE_PRIOR_CTRL,
  DRV_BISSM_DATA_ACTIVE_ACTIVE_AFTER_CTRL,
  DRV_BISSM_DATA_ACTIVE_ACTIVE
}
 
enum  DRV_BISSM_DATA_TYPE_E {
  DRV_BISSM_DATA_TYPE_SENS = 0,
  DRV_BISSM_DATA_TYPE_ACT
}
 
enum  DRV_BISSM_DATA_ALIGN_E {
  DRV_BISSM_DATA_ALIGN_LEFT = 0,
  DRV_BISSM_DATA_ALIGN_RIGHT
}
 
enum  DRV_BISSM_CHANNEL_PARAM_E {
  DRV_BISSM_CHANNEL_PARAM_DATA_ACTIVE = 0,
  DRV_BISSM_CHANNEL_PARAM_DATA_TYPE,
  DRV_BISSM_CHANNEL_PARAM_DATA_LEN,
  DRV_BISSM_CHANNEL_PARAM_DATA_ALIGN,
  DRV_BISSM_CHANNEL_PARAM_CRC_POLY,
  DRV_BISSM_CHANNEL_PARAM_CRC_START,
  DRV_BISSM_CHANNEL_PARAM_EXT_DATA_LEN,
  DRV_BISSM_CHANNEL_PARAM_EXT_CRC_POLY,
  DRV_BISSM_CHANNEL_PARAM_EXT_CRC_START
}
 
enum  DRV_BISSM_RESULT_E {
  DRV_BISSM_OK,
  DRV_BISSM_ERR_INIT_FAILED,
  DRV_BISSM_ERR_INVAL_PARAMETER,
  DRV_BISSM_ERR_INVAL_STATE
}
 
enum  DRV_BISSM_FRM_ERR_E {
  DRV_BISSM_FRM_OK = 0,
  DRV_BISSM_FRM_ERR_SLAVE_NRDY = 1,
  DRV_BISSM_FRM_ERR_ACK_TIMEOUT = 2,
  DRV_BISSM_FRM_ERR_ACK_INVALID = 3,
  DRV_BISSM_FRM_ERR_BUSY_TIMEOUT = 4,
  DRV_BISSM_FRM_ERR_STOP_INVALID = 7
}
 
enum  DRV_BISSM_TRIGGER_TYPE_E {
  DRV_BISSM_TRIGGER_TYPE_NONE,
  DRV_BISSM_TRIGGER_TYPE_MANUAL,
  DRV_BISSM_TRIGGER_TYPE_XC_TRIGGER_OUT0,
  DRV_BISSM_TRIGGER_TYPE_XC_TRIGGER_OUT0_INV,
  DRV_BISSM_TRIGGER_TYPE_XC_TRIGGER_OUT1,
  DRV_BISSM_TRIGGER_TYPE_XC_TRIGGER_OUT1_INV,
  DRV_BISSM_TRIGGER_TYPE_XC_SAMPLE_IN0,
  DRV_BISSM_TRIGGER_TYPE_XC_SAMPLE_IN0_INV,
  DRV_BISSM_TRIGGER_TYPE_XC_SAMPLE_IN1,
  DRV_BISSM_TRIGGER_TYPE_XC_SAMPLE_IN1_INV,
  DRV_BISSM_TRIGGER_TYPE_GPIO_APP_COUNTER_ZERO0,
  DRV_BISSM_TRIGGER_TYPE_GPIO_APP_COUNTER_ZERO1,
  DRV_BISSM_TRIGGER_TYPE_GPIO_APP_COUNTER_ZERO2
}
 
enum  DRV_BISSM_CTRL_RESULT_E {
  DRV_BISSM_CTRL_OK = 0,
  DRV_BISSM_CTRL_ERR_ID_LOCK_INVALID,
  DRV_BISSM_CTRL_ERR_NO_ID_ACK,
  DRV_BISSM_CTRL_ERR_ADDR_NOT_IMPLEMENTED,
  DRV_BISSM_CTRL_ERR_DATA_OR_CRC_ERR,
  DRV_BISSM_CTRL_ERR_TIMEOUT,
  DRV_BISSM_CTRL_ERR_ABORT,
  DRV_BISSM_CTRL_ERR_BISS_FRAME_ERR
}
 
enum  DRV_BISSM_DATA_STATE_E {
  DRV_BISSM_DATA_OK = 0,
  DRV_BISSM_DATA_ERR_FRM,
  DRV_BISSM_DATA_ERR_CRC
}
 

Functions

DRV_BISSM_RESULT_E DRV_BissM_Init (DRV_BISSM_CFG_T *ptConfig, void *pvUser)
 
DRV_BISSM_RESULT_E DRV_BissM_SetParam (DRV_BISSM_PARAM_E ePrmID, uint32_t ulPrmVal)
 
DRV_BISSM_RESULT_E DRV_BissM_SetChannelParam (unsigned int uChNr, DRV_BISSM_CHANNEL_PARAM_E ePrmID, uint32_t ulPrmVal)
 
DRV_BISSM_RESULT_E DRV_BissM_SetProcessData (unsigned int uChNr, const uint8_t *pbData)
 
DRV_BISSM_RESULT_E DRV_BissM_GetProcessData (unsigned int uChNr, DRV_BISSM_DATA_STATE_E *peStatus, uint16_t *pusCycleCnt, uint8_t *pbData)
 
DRV_BISSM_RESULT_E DRV_BissM_GetSsiExtData (unsigned int uChNr, DRV_BISSM_DATA_STATE_E *peStatus, uint16_t *pusCycleCnt, uint8_t *pbData)
 
DRV_BISSM_RESULT_E DRV_BissM_StartTrigger (DRV_BISSM_TRIGGER_TYPE_E eTriggerCfg)
 
DRV_BISSM_RESULT_E DRV_BissM_StartAgsMin (void)
 
DRV_BISSM_RESULT_E DRV_BissM_StartCycle (uint32_t ulCycleTimeUs)
 
DRV_BISSM_RESULT_E DRV_BissM_Stop ()
 
DRV_BISSM_RESULT_E DRV_BissM_GetState (DRV_BISSM_STATE_T *ptState)
 
DRV_BISSM_RESULT_E DRV_BissM_GetCtrlState (DRV_BISSM_CTRL_STATE_T *ptCtrlState)
 
DRV_BISSM_RESULT_E DRV_BissM_StartCtrlCmd (unsigned int uSlaveId, unsigned int uOpcode)
 
DRV_BISSM_RESULT_E DRV_BissM_StartCtrlReg (unsigned int uSlaveId, unsigned int uRegAdr, unsigned int uRegNr, unsigned int uWnR)
 
DRV_BISSM_RESULT_E DRV_BissM_CtrlRst (void)
 
DRV_BISSM_RESULT_E DRV_BissM_SetCtrlData (unsigned int uRegNr, const uint8_t *pbData)
 
DRV_BISSM_RESULT_E DRV_BissM_GetCtrlData (unsigned int uRegNr, uint8_t *pbData)
 
uint32_t DRV_BissM_GetIrqRaw (void)
 
void DRV_BissM_ConfirmIrq (uint32_t ulIrqMsk)
 
uint32_t DRV_BissM_GetIrq (void)
 
void DRV_BissM_IrqEnable (uint32_t ulIrqMsk)
 
void DRV_BissM_IrqDisable (uint32_t ulIrqMsk)
 
uint32_t DRV_BissM_GetConfirmIrq (void)
 
void DRV_BissM_ConfirmAllIrq (void)
 
void DRV_BissM_Break (void)
 
uint32_t DRV_BissM_Status0 (void)
 

Detailed Description

Header file of BISS controller module.

Warning
WARNING!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! The BISS does not work out of the box or via hardware config!
Revision
6027
Date
2019-08-09 14:15:52 +0200 (Fr, 09 Aug 2019)
Note
Exclusion of Liability for this demo software: The following software is intended for and must only be used for reference and in an evaluation laboratory environment. It is provided without charge and is subject to alterations. There is no warranty for the software, to the extent permitted by applicable law. Except when otherwise stated in writing the copyright holders and/or other parties provide the software "as is" without warranty of any kind, either expressed or implied. Please refer to the Agreement in README_DISCLAIMER.txt, provided together with this file! By installing or otherwise using the software, you accept the terms of this Agreement. If you do not agree to the terms of this Agreement, then do not install or use the Software!

Definition in file netx_drv_biss.h.