WizziLab / modem_ref

Dependents:   modem_ref_helper

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers alp_itf_d7a.cpp Source File

alp_itf_d7a.cpp

00001 #include "alp.h"
00002 
00003 _private int alp_itf_d7a_ovld_size(u8* ovld)
00004 {
00005     d7a_addressee_ctrl_t actl;
00006     actl.byte = ovld[0];
00007     int size = D7A_ADDR_LEN(actl);
00008     return size;
00009 }
00010 
00011 //======================================================================
00012 // alp_itf_d7a_cfg_size
00013 //----------------------------------------------------------------------
00014 /// @brief  Get size of the D7A interface configuration
00015 /// @param  cfg pointer to the configuration
00016 /// @return int configuration size
00017 //======================================================================
00018 _public int alp_itf_d7a_cfg_size(u8* cfg)
00019 {
00020     int size = sizeof(d7a_sp_cfg_t) - sizeof(d7a_addressee_t);
00021     size += alp_itf_d7a_ovld_size(&cfg[offsetof(d7a_sp_cfg_t,addressee)]);
00022     return size;
00023 }