Sound Open Firmware
Loading...
Searching...
No Matches
ams.h File Reference
Include dependency graph for ams.h:

Go to the source code of this file.

Data Structures

struct  ams_message_payload
 IXC message payload. More...
struct  ams_slot
struct  ams_consumer_entry
 Internal struct ams_consumer_entry. More...
struct  ams_producer
struct  uuid_idx
struct  ams_shared_context
struct  ams_context
struct  ams_task
struct  async_message_service

Macros

#define AMS_INVALID_MSG_TYPE   0
#define AMS_INVALID_SLOT   0xFF
#define AMS_ANY_ID   0xFFFF
#define AMS_SERVICE_UUID_TABLE_SIZE   16
#define AMS_ROUTING_TABLE_SIZE   16
#define AMS_MAX_MSG_SIZE   0x1000

Typedefs

typedef void(* ams_msg_callback_fn) (const struct ams_message_payload *const ams_message_payload, void *ctx)
 ams_msg_callback_fn

Functions

static int ams_init (void)
static int ams_get_message_type_id (const uint8_t *message_uuid, uint32_t *message_type_id)
static int ams_register_producer (uint32_t message_type_id, uint16_t module_id, uint16_t instance_id)
static int ams_unregister_producer (uint32_t message_type_id, uint16_t module_id, uint16_t instance_id)
static int ams_register_consumer (uint32_t message_type_id, uint16_t module_id, uint16_t instance_id, ams_msg_callback_fn function, void *ctx)
static int ams_unregister_consumer (uint32_t message_type_id, uint16_t module_id, uint16_t instance_id, ams_msg_callback_fn function)
static int ams_send (const struct ams_message_payload *payload)
static int ams_send_mi (const struct ams_message_payload *payload, uint16_t module_id, uint16_t instance_id)
static struct ams_shared_context * ams_ctx_get (void)
static int process_incoming_message (uint32_t slot)
struct async_message_service ** arch_ams_get (void)

Macro Definition Documentation

◆ AMS_ANY_ID

#define AMS_ANY_ID   0xFFFF

◆ AMS_INVALID_MSG_TYPE

#define AMS_INVALID_MSG_TYPE   0

◆ AMS_INVALID_SLOT

#define AMS_INVALID_SLOT   0xFF

◆ AMS_MAX_MSG_SIZE

#define AMS_MAX_MSG_SIZE   0x1000

◆ AMS_ROUTING_TABLE_SIZE

#define AMS_ROUTING_TABLE_SIZE   16

◆ AMS_SERVICE_UUID_TABLE_SIZE

#define AMS_SERVICE_UUID_TABLE_SIZE   16

Typedef Documentation

◆ ams_msg_callback_fn

typedef void(* ams_msg_callback_fn) (const struct ams_message_payload *const ams_message_payload, void *ctx)

ams_msg_callback_fn

Each subscriber provides this handler function for each message ID

Function Documentation

◆ ams_ctx_get()

struct ams_shared_context * ams_ctx_get ( void )
inlinestatic

◆ ams_get_message_type_id()

int ams_get_message_type_id ( const uint8_t * message_uuid,
uint32_t * message_type_id )
inlinestatic

◆ ams_init()

int ams_init ( void )
inlinestatic

◆ ams_register_consumer()

int ams_register_consumer ( uint32_t message_type_id,
uint16_t module_id,
uint16_t instance_id,
ams_msg_callback_fn function,
void * ctx )
inlinestatic

◆ ams_register_producer()

int ams_register_producer ( uint32_t message_type_id,
uint16_t module_id,
uint16_t instance_id )
inlinestatic

◆ ams_send()

int ams_send ( const struct ams_message_payload * payload)
inlinestatic

◆ ams_send_mi()

int ams_send_mi ( const struct ams_message_payload * payload,
uint16_t module_id,
uint16_t instance_id )
inlinestatic

◆ ams_unregister_consumer()

int ams_unregister_consumer ( uint32_t message_type_id,
uint16_t module_id,
uint16_t instance_id,
ams_msg_callback_fn function )
inlinestatic

◆ ams_unregister_producer()

int ams_unregister_producer ( uint32_t message_type_id,
uint16_t module_id,
uint16_t instance_id )
inlinestatic

◆ arch_ams_get()

struct async_message_service ** arch_ams_get ( void )

◆ process_incoming_message()

int process_incoming_message ( uint32_t slot)
inlinestatic