remove unused functions + adapt passed parameter

- remove unused functions form usb_reg_map
- change passed buffer type to uint8 *
This commit is contained in:
stevstrong 2016-10-31 22:12:04 +01:00
parent 529f844ff9
commit 4bc4b1d6bd
3 changed files with 8 additions and 8 deletions

View File

@ -29,7 +29,7 @@
/* TODO these could use some improvement; they're fairly
* straightforward ports of the analogous ST code. The PMA blit
* routines in particular are obvious targets for performance
* measurement and tuning. */
* measurement and tuning.
void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset) {
uint16 *dst = (uint16*)usb_pma_ptr(pma_offset);
@ -57,7 +57,7 @@ void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset) {
*dst = *src & 0xFF;
}
}
*/
static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
uint16 nblocks;
if (count > 62) {
@ -76,12 +76,12 @@ static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
*rxc = nblocks << 10;
}
}
/*
void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count) {
uint32 *rxc = usb_ep_rx_buf0_count_ptr(ep);
usb_set_ep_rx_count_common(rxc, count);
}
*/
void usb_set_ep_rx_count(uint8 ep, uint16 count) {
uint32 *rxc = usb_ep_rx_count_ptr(ep);
usb_set_ep_rx_count_common(rxc, count);

View File

@ -65,7 +65,7 @@ public:
size_t write(uint8);
size_t write(const char *str);
size_t write(const void*, uint32);
size_t write(const uint8*, uint32);
uint8 getRTS();
uint8 getDTR();

View File

@ -345,10 +345,10 @@ static inline void usb_clear_status_out(uint8 ep) {
/*
* PMA conveniences
*/
/*
void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset);
void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset);
*/
static inline uint32 * usb_pma_ptr(uint32 offset) {
return (uint32*)(USB_PMA_BASE + 2 * offset);
}
@ -567,7 +567,7 @@ static inline uint16 usb_get_ep_rx_buf0_count(uint8 ep) {
return usb_get_ep_tx_count(ep);
}
void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count);
//void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count);
static inline uint32* usb_ep_rx_buf1_count_ptr(uint8 ep) {
return usb_ep_rx_count_ptr(ep);