feat: add profiled DualSense PCM haptics experiment
This commit is contained in:
parent
3b1366067b
commit
0c626fb3b3
29 changed files with 4469 additions and 5 deletions
|
|
@ -0,0 +1,20 @@
|
|||
#pragma once
|
||||
|
||||
#include <cassert>
|
||||
|
||||
struct critical_section_t {
|
||||
bool initialized = false;
|
||||
};
|
||||
inline unsigned native_probe_lock_depth = 0;
|
||||
inline void critical_section_init(critical_section_t* section) {
|
||||
assert(!section->initialized);
|
||||
section->initialized = true;
|
||||
}
|
||||
inline void critical_section_enter_blocking(critical_section_t* section) {
|
||||
assert(section->initialized && native_probe_lock_depth == 0);
|
||||
++native_probe_lock_depth;
|
||||
}
|
||||
inline void critical_section_exit(critical_section_t*) {
|
||||
assert(native_probe_lock_depth == 1);
|
||||
--native_probe_lock_depth;
|
||||
}
|
||||
4
tests/haptics_transport_probe_native_stubs/pico/stdlib.h
Normal file
4
tests/haptics_transport_probe_native_stubs/pico/stdlib.h
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#pragma once
|
||||
|
||||
#include <stdint.h>
|
||||
uint64_t time_us_64();
|
||||
Loading…
Add table
Add a link
Reference in a new issue