mirror of https://github.com/ARMmbed/mbed-os.git
Added emac_stack_mem_copy. Needed by the u-blox ODIN-W2 driver.
parent
a49783c34f
commit
10cfea3bd8
|
@ -47,6 +47,11 @@ void emac_stack_mem_free(emac_stack_t* stack, emac_stack_mem_t *mem)
|
|||
pbuf_free((struct pbuf*)mem);
|
||||
}
|
||||
|
||||
void emac_stack_mem_copy(emac_stack_t* stack, emac_stack_mem_t *to, emac_stack_mem_t *from)
|
||||
{
|
||||
pbuf_copy((struct pbuf*)to, (struct pbuf*)from);
|
||||
}
|
||||
|
||||
void *emac_stack_mem_ptr(emac_stack_t* stack, emac_stack_mem_t *mem)
|
||||
{
|
||||
return ((struct pbuf*)mem)->payload;
|
||||
|
|
|
@ -49,6 +49,15 @@ emac_stack_mem_t *emac_stack_mem_alloc(emac_stack_t* stack, uint32_t size, uint3
|
|||
*/
|
||||
void emac_stack_mem_free(emac_stack_t* stack, emac_stack_mem_t *mem);
|
||||
|
||||
/**
|
||||
* Copy memory
|
||||
*
|
||||
* @param stack Emac stack context
|
||||
* @param to Memory to copy to
|
||||
* @param from Memory to copy from
|
||||
*/
|
||||
void emac_stack_mem_copy(emac_stack_t* stack, emac_stack_mem_t *to, emac_stack_mem_t *from);
|
||||
|
||||
/**
|
||||
* Return pointer to the payload
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue