libmetal
Loading...
Searching...
No Matches
Data Structures | Macros | Typedefs | Functions | Variables
Top Level Interfaces

Data Structures

struct  metal_init_params
 
struct  metal_common_state
 

Macros

#define METAL_BAD_OFFSET   ((unsigned long)-1)
 
#define METAL_BAD_PHYS   ((metal_phys_addr_t)-1)
 
#define METAL_BAD_VA   ((void *)-1)
 
#define METAL_BAD_IRQ   ((metal_irq_t)-1)
 
#define METAL_INIT_DEFAULTS
 

Typedefs

typedef unsigned long metal_phys_addr_t
 
typedef int metal_irq_t
 

Functions

int metal_init (const struct metal_init_params *params)
 Initialize libmetal.
 
void metal_finish (void)
 Shutdown libmetal.
 

Variables

struct metal_state _metal
 

Detailed Description

Macro Definition Documentation

◆ METAL_BAD_IRQ

#define METAL_BAD_IRQ   ((metal_irq_t)-1)

Bad IRQ.

◆ METAL_BAD_OFFSET

#define METAL_BAD_OFFSET   ((unsigned long)-1)

Bad offset into shared memory or I/O region.

◆ METAL_BAD_PHYS

#define METAL_BAD_PHYS   ((metal_phys_addr_t)-1)

Bad physical address value.

◆ METAL_BAD_VA

#define METAL_BAD_VA   ((void *)-1)

Bad virtual address value.

◆ METAL_INIT_DEFAULTS

#define METAL_INIT_DEFAULTS
Value:
{ \
.log_handler = metal_default_log_handler, \
.log_level = METAL_LOG_INFO, \
}
void metal_default_log_handler(enum metal_log_level level, const char *format,...)
Default libmetal log handler. This handler prints libmetal log messages to stderr.
Definition: log.c:13
@ METAL_LOG_INFO
Definition: log.h:31

Typedef Documentation

◆ metal_irq_t

typedef int metal_irq_t

Interrupt request number.

◆ metal_phys_addr_t

typedef unsigned long metal_phys_addr_t

Physical address type.

Function Documentation

◆ metal_finish()

void metal_finish ( void  )

Shutdown libmetal.

Shutdown the libmetal library, and release all reserved resources.

See also
metal_init

◆ metal_init()

int metal_init ( const struct metal_init_params params)

Initialize libmetal.

Initialize the libmetal library.

Parameters
[in]paramsInitialization params (
See also
metal_init_params).
Returns
0 on success, or -errno on failure.
See also
metal_finish

Variable Documentation

◆ _metal

struct metal_state _metal
extern

System specific runtime data.