mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-12-09 13:15:18 -05:00
gigabeats usb-target: merge in system-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31493 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
a117e770a5
commit
4d5dff4eae
2 changed files with 15 additions and 43 deletions
|
|
@ -85,4 +85,19 @@ struct ARM_REGS {
|
|||
|
||||
void dumpregs(void);
|
||||
|
||||
void usb_connect_event(void);
|
||||
|
||||
/** Sector read/write filters **/
|
||||
|
||||
/* Filter some things in the MBR - see usb-gigabeat-s.c */
|
||||
void usb_fix_mbr(unsigned char *mbr);
|
||||
#define USBSTOR_READ_SECTORS_FILTER() \
|
||||
({ if (cur_cmd.sector == 0) \
|
||||
usb_fix_mbr(cur_cmd.data[cur_cmd.data_select]); \
|
||||
0; })
|
||||
|
||||
/* Disallow MBR writes entirely since it was "fixed" in usb_fix_mbr */
|
||||
#define USBSTOR_WRITE_SECTORS_FILTER() \
|
||||
({ cur_cmd.sector != 0 ? 0 : -1; })
|
||||
|
||||
#endif /* SYSTEM_TARGET_H */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue