caffeine-sal 0.1.17
Header-only polymorphic middleware services layer for the Caffeine Framework
Loading...
Searching...
No Matches
Macros
cfn_sal.h File Reference

Core definitions and macros for Caffeine SAL. More...

#include "cfn_hal.h"
#include "cfn_hal_base.h"
#include "cfn_sal_types.h"

Go to the source code of this file.

Macros

#define CFN_SAL_PREFIX   'S'
 Prefix for all Service-level types. Distinguishes services ('S') from HAL peripherals ('A').
 
#define CFN_SAL_TYPE(a, b, c)   CFN_HAL_MAKE_TYPE(CFN_SAL_PREFIX, a, b, c)
 Helper macro to create a Service FourCC type.
 
#define CFN_SAL_ERROR_BASE   0x600
 Service-level error code base offset. Offsets service errors from HAL errors to avoid collisions.
 
#define CFN_SAL_CREATE_DRIVER_TYPE(prefix, config_type, api_type, phy_type, cb_type)
 

Detailed Description

Core definitions and macros for Caffeine SAL.

Macro Definition Documentation

◆ CFN_SAL_CREATE_DRIVER_TYPE

#define CFN_SAL_CREATE_DRIVER_TYPE (   prefix,
  config_type,
  api_type,
  phy_type,
  cb_type 
)
Value:
struct cfn_##prefix##_s \
{ \
cfn_hal_driver_t base; \
const config_type *config; \
const api_type *api; \
const phy_type *phy; \
cb_type cb; \
void *cb_user_arg; \
}; \
typedef struct cfn_##prefix##_s cfn_##prefix##_t

◆ CFN_SAL_ERROR_BASE

#define CFN_SAL_ERROR_BASE   0x600

Service-level error code base offset. Offsets service errors from HAL errors to avoid collisions.

◆ CFN_SAL_PREFIX

#define CFN_SAL_PREFIX   'S'

Prefix for all Service-level types. Distinguishes services ('S') from HAL peripherals ('A').

◆ CFN_SAL_TYPE

#define CFN_SAL_TYPE (   a,
  b,
 
)    CFN_HAL_MAKE_TYPE(CFN_SAL_PREFIX, a, b, c)

Helper macro to create a Service FourCC type.