fw-AT-START-F435/OS/os/hal/ports/ARTERY/hal_pal_lld.h

65 lines
1.3 KiB
C

/**
* @brief Width, in bits, of an I/O port.
*/
#define PAL_IOPORTS_WIDTH 16
/**
* @name Line handling macros
* @{
*/
/**
* @brief Forms a line identifier.
* @details A port/pad pair are encoded into an @p ioline_t type. The encoding
* of this type is platform-dependent.
* @note In this driver the pad number is encoded in the lower 4 bits of
* the GPIO address which are guaranteed to be zero.
*/
#define PAL_LINE(port, pad) \
((ioline_t)((uint32_t)(port)) | ((uint32_t)(pad)))
/* Specifies palInit() without parameter, required until all platforms will
be updated to the new style.*/
#define PAL_NEW_INIT
/**
* @brief Digital I/O port sized unsigned type.
*/
typedef uint32_t ioportmask_t;
/**
* @brief Digital I/O modes.
*/
typedef uint32_t iomode_t;
/**
* @brief Type of an I/O line.
*/
typedef uint32_t ioline_t;
/**
* @brief Type of an event mode.
*/
typedef uint32_t ioeventmode_t;
typedef gpio_type *ioportid_t;
/**
* @brief Type of an pad identifier.
*/
typedef uint32_t iopadid_t;
#define pal_lld_init(config) _pal_lld_init(config)
#ifdef __cplusplus
extern "C" {
#endif
void _pal_lld_init(void);
#ifdef __cplusplus
}
#endif
//typedef struct {
//} PALConfig;
//extern const PALConfig pal_default_config;