forked from yystopf/xiuos
Add comments
This commit is contained in:
parent
a3795dd0f7
commit
3acfca1e34
|
@ -1,6 +1,16 @@
|
|||
#include <libmem.h>
|
||||
#include "usb_mem.h"
|
||||
|
||||
/*************************************************
|
||||
File name: usb_mem.c
|
||||
Description: support usb memory management
|
||||
Others: take CherryUSB v0.1.2/CherryUSB/port/xhci/usb_hc_xhci.c for references
|
||||
https://github.com/cherry-embedded/CherryUSB/blob/v0.10.2/port/xhci/usb_hc_xhci.c
|
||||
History:
|
||||
1. Date: 2024-06-12
|
||||
Author: AIIT XUOS Lab
|
||||
Modification: re-develop usb_hc_malloc, usb_hc_malloc_align and usb_hc_free functions
|
||||
*************************************************/
|
||||
|
||||
|
||||
void *usb_hc_malloc(size_t size){
|
||||
|
|
|
@ -2,7 +2,23 @@
|
|||
* Copyright (c) 2022, sakumisu
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************
|
||||
File name: usb_mem.h
|
||||
Description: support usb memory management
|
||||
Others: take CherryUSB v0.10.2/CherryUSB/cherryusb_config_template.h for references
|
||||
https://github.com/cherry-embedded/CherryUSB/blob/v0.10.2/cherryusb_config_template.h
|
||||
History:
|
||||
1. Date: 2024-06-12
|
||||
Author: AIIT XUOS Lab
|
||||
Modification: Use usb_malloc, usb_free and usb_align functions
|
||||
*************************************************/
|
||||
|
||||
|
||||
#ifndef USB_MEM_H_
|
||||
#define USB_MEM_H_
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include "usb_osal.h"
|
||||
#include "libserial.h"
|
||||
#include "syscall.h"
|
||||
#include "usyscall.h"
|
||||
|
||||
|
||||
|
@ -17,6 +18,13 @@ usb_osal_thread_t usb_osal_thread_create(const char *name, uint32_t stack_size,
|
|||
return (usb_osal_thread_t)ret;
|
||||
}
|
||||
|
||||
void usb_osal_thread_delete(usb_osal_thread_t thread){
|
||||
int thread_id;
|
||||
thread_id = (int)thread;
|
||||
|
||||
kill(thread_id);
|
||||
}
|
||||
|
||||
|
||||
usb_osal_sem_t usb_osal_sem_create(uint32_t initial_count){
|
||||
|
||||
|
|
Loading…
Reference in New Issue