This commit is contained in:
2025-05-04 00:42:15 +02:00
parent 88efccb65a
commit f280a2a1ca
8 changed files with 197 additions and 40 deletions

View File

@@ -631,10 +631,10 @@ static int cci_write_register(uint16_t reg, uint16_t value)
{
// Write the register address and value
uint8_t write_buf[4] = {
uint8_t (reg >> 8 & 0xff),
uint8_t (reg & 0xff),
uint8_t (value >> 8 & 0xff),
uint8_t (value & 0xff)
(uint8_t) (reg >> 8 & 0xff),
(uint8_t) (reg & 0xff),
(uint8_t) (value >> 8 & 0xff),
(uint8_t) (value & 0xff)
};
if (i2c_master_write_slave(CCI_ADDRESS, write_buf, sizeof(write_buf)) != ESP_OK) {
printf("[CCI] Error: failed to write CCI register %02x with value %02x\n", reg, value);

View File

@@ -6,7 +6,7 @@
#include "lepton_utilities.h"
#include "i2c.h"
#include "vospi.h"
#include <cstring>
#include <string.h>
// lepton image and telem buffer