Skip to content

Commit 4bc4b1d

Browse files
committed
remove unused functions + adapt passed parameter
- remove unused functions form usb_reg_map - change passed buffer type to uint8 *
1 parent 529f844 commit 4bc4b1d

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

STM32F1/cores/maple/libmaple/usb/stm32f1/usb_reg_map.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
/* TODO these could use some improvement; they're fairly
3030
* straightforward ports of the analogous ST code. The PMA blit
3131
* routines in particular are obvious targets for performance
32-
* measurement and tuning. */
32+
* measurement and tuning.
3333
3434
void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset) {
3535
uint16 *dst = (uint16*)usb_pma_ptr(pma_offset);
@@ -57,7 +57,7 @@ void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset) {
5757
*dst = *src & 0xFF;
5858
}
5959
}
60-
60+
*/
6161
static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
6262
uint16 nblocks;
6363
if (count > 62) {
@@ -76,12 +76,12 @@ static void usb_set_ep_rx_count_common(uint32 *rxc, uint16 count) {
7676
*rxc = nblocks << 10;
7777
}
7878
}
79-
79+
/*
8080
void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count) {
8181
uint32 *rxc = usb_ep_rx_buf0_count_ptr(ep);
8282
usb_set_ep_rx_count_common(rxc, count);
8383
}
84-
84+
*/
8585
void usb_set_ep_rx_count(uint8 ep, uint16 count) {
8686
uint32 *rxc = usb_ep_rx_count_ptr(ep);
8787
usb_set_ep_rx_count_common(rxc, count);

STM32F1/cores/maple/usb_serial.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class USBSerial : public Stream {
6565

6666
size_t write(uint8);
6767
size_t write(const char *str);
68-
size_t write(const void*, uint32);
68+
size_t write(const uint8*, uint32);
6969

7070
uint8 getRTS();
7171
uint8 getDTR();

STM32F1/system/libmaple/usb/stm32f1/usb_reg_map.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -345,10 +345,10 @@ static inline void usb_clear_status_out(uint8 ep) {
345345
/*
346346
* PMA conveniences
347347
*/
348-
348+
/*
349349
void usb_copy_to_pma(const uint8 *buf, uint16 len, uint16 pma_offset);
350350
void usb_copy_from_pma(uint8 *buf, uint16 len, uint16 pma_offset);
351-
351+
*/
352352
static inline uint32 * usb_pma_ptr(uint32 offset) {
353353
return (uint32*)(USB_PMA_BASE + 2 * offset);
354354
}
@@ -567,7 +567,7 @@ static inline uint16 usb_get_ep_rx_buf0_count(uint8 ep) {
567567
return usb_get_ep_tx_count(ep);
568568
}
569569

570-
void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count);
570+
//void usb_set_ep_rx_buf0_count(uint8 ep, uint16 count);
571571

572572
static inline uint32* usb_ep_rx_buf1_count_ptr(uint8 ep) {
573573
return usb_ep_rx_count_ptr(ep);

0 commit comments

Comments
 (0)