ch32v003 changes
- memset crashes (why?) - FIFO buffer to big for RAM
This commit is contained in:
parent
5e9604112e
commit
0bab1469a3
@ -176,13 +176,7 @@ void si_enable_irq();
|
||||
*/
|
||||
#define SI_CHECK_RC(rc) \
|
||||
do { \
|
||||
if (si_print_error_if_any(rc)) { \
|
||||
INV_MSG(INV_MSG_LEVEL_ERROR, "At %s (line %d)", __FILE__, __LINE__); \
|
||||
si_sleep_us(100000); \
|
||||
while (1) \
|
||||
; \
|
||||
} \
|
||||
} while (0)
|
||||
} while (0);
|
||||
|
||||
/** @brief Check return code from driver and print message if it is an error.
|
||||
* @param[in] rc Return code from the driver.
|
||||
|
@ -44,8 +44,6 @@ int inv_imu_init(inv_imu_device_t *s, const struct inv_imu_serif *serif,
|
||||
{
|
||||
int status = 0;
|
||||
|
||||
memset(s, 0, sizeof(*s));
|
||||
|
||||
/* Verify validity of `serif` variable */
|
||||
if (serif == NULL || serif->read_reg == NULL || serif->write_reg == NULL)
|
||||
return INV_ERROR;
|
||||
|
@ -57,7 +57,8 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/** Max buffer size mirrored from FIFO at polling time */
|
||||
#define FIFO_MIRRORING_SIZE 16 * 258 // packet size * max_count = 4kB
|
||||
// #define FIFO_MIRRORING_SIZE 16 * 258 // packet size * max_count = 4kB
|
||||
#define FIFO_MIRRORING_SIZE 258
|
||||
|
||||
/** Sensor identifier for UI control function */
|
||||
enum inv_imu_sensor {
|
||||
|
Loading…
x
Reference in New Issue
Block a user