Skip to content

Commit c9c7dfa

Browse files
committed
more clean up
1 parent 069215c commit c9c7dfa

File tree

1 file changed

+15
-11
lines changed

1 file changed

+15
-11
lines changed

src/portable/raspberrypi/rp2040/rp2040_usb.h

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -82,26 +82,30 @@ void hw_endpoint_reset_transfer(struct hw_endpoint *ep);
8282

8383
void _hw_endpoint_buffer_control_update32(struct hw_endpoint *ep, uint32_t and_mask, uint32_t or_mask);
8484

85-
TU_ATTR_ALWAYS_INLINE static inline uint32_t _hw_endpoint_buffer_control_get_value32(struct hw_endpoint *ep) {
86-
return *ep->buffer_control;
85+
TU_ATTR_ALWAYS_INLINE static inline uint32_t _hw_endpoint_buffer_control_get_value32 (struct hw_endpoint *ep)
86+
{
87+
return *ep->buffer_control;
8788
}
8889

89-
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_set_value32(struct hw_endpoint *ep, uint32_t value) {
90-
return _hw_endpoint_buffer_control_update32(ep, 0, value);
90+
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_set_value32 (struct hw_endpoint *ep, uint32_t value)
91+
{
92+
return _hw_endpoint_buffer_control_update32(ep, 0, value);
9193
}
9294

93-
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_set_mask32(struct hw_endpoint *ep, uint32_t value) {
94-
return _hw_endpoint_buffer_control_update32(ep, ~value, value);
95+
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_set_mask32 (struct hw_endpoint *ep, uint32_t value)
96+
{
97+
return _hw_endpoint_buffer_control_update32(ep, ~value, value);
9598
}
9699

97-
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_clear_mask32(struct hw_endpoint *ep, uint32_t value) {
98-
return _hw_endpoint_buffer_control_update32(ep, ~value, 0);
100+
TU_ATTR_ALWAYS_INLINE static inline void _hw_endpoint_buffer_control_clear_mask32 (struct hw_endpoint *ep, uint32_t value)
101+
{
102+
return _hw_endpoint_buffer_control_update32(ep, ~value, 0);
99103
}
100104

101-
static inline uintptr_t hw_data_offset(uint8_t *buf)
105+
static inline uintptr_t hw_data_offset (uint8_t *buf)
102106
{
103-
// Remove usb base from buffer pointer
104-
return (uintptr_t)buf ^ (uintptr_t)usb_dpram;
107+
// Remove usb base from buffer pointer
108+
return (uintptr_t) buf ^ (uintptr_t) usb_dpram;
105109
}
106110

107111
extern const char *ep_dir_string[];

0 commit comments

Comments
 (0)