mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Merge branch 'ofw-dev' into dev
This commit is contained in:
@@ -61,7 +61,7 @@ void bq25896_init(FuriHalI2cBusHandle* handle) {
|
||||
|
||||
// OTG power configuration
|
||||
bq25896_regs.r0A.BOOSTV = 0x8; // BOOST Voltage: 5.062V
|
||||
bq25896_regs.r0A.BOOST_LIM = BOOST_LIM_1400; // BOOST Current limit: 1.4A
|
||||
bq25896_regs.r0A.BOOST_LIM = BoostLim_1400; // BOOST Current limit: 1.4A
|
||||
furi_hal_i2c_write_reg_8(
|
||||
handle, BQ25896_ADDRESS, 0x0A, *(uint8_t*)&bq25896_regs.r0A, BQ25896_I2C_TIMEOUT);
|
||||
|
||||
@@ -74,6 +74,12 @@ void bq25896_init(FuriHalI2cBusHandle* handle) {
|
||||
BQ25896_I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
void bq25896_set_boost_lim(FuriHalI2cBusHandle* handle, BoostLim boost_lim) {
|
||||
bq25896_regs.r0A.BOOST_LIM = boost_lim;
|
||||
furi_hal_i2c_write_reg_8(
|
||||
handle, BQ25896_ADDRESS, 0x0A, *(uint8_t*)&bq25896_regs.r0A, BQ25896_I2C_TIMEOUT);
|
||||
}
|
||||
|
||||
void bq25896_poweroff(FuriHalI2cBusHandle* handle) {
|
||||
bq25896_regs.r09.BATFET_DIS = 1;
|
||||
furi_hal_i2c_write_reg_8(
|
||||
|
||||
@@ -9,6 +9,9 @@
|
||||
/** Initialize Driver */
|
||||
void bq25896_init(FuriHalI2cBusHandle* handle);
|
||||
|
||||
/** Set boost lim*/
|
||||
void bq25896_set_boost_lim(FuriHalI2cBusHandle* handle, BoostLim boost_lim);
|
||||
|
||||
/** Send device into shipping mode */
|
||||
void bq25896_poweroff(FuriHalI2cBusHandle* handle);
|
||||
|
||||
|
||||
@@ -159,14 +159,16 @@ typedef struct {
|
||||
#define BOOSTV_128 (1 << 1)
|
||||
#define BOOSTV_64 (1 << 0)
|
||||
|
||||
#define BOOST_LIM_500 (0b000)
|
||||
#define BOOST_LIM_750 (0b001)
|
||||
#define BOOST_LIM_1200 (0b010)
|
||||
#define BOOST_LIM_1400 (0b011)
|
||||
#define BOOST_LIM_1650 (0b100)
|
||||
#define BOOST_LIM_1875 (0b101)
|
||||
#define BOOST_LIM_2150 (0b110)
|
||||
#define BOOST_LIM_RSVD (0b111)
|
||||
typedef enum {
|
||||
BoostLim_500 = 0b000,
|
||||
BoostLim_750 = 0b001,
|
||||
BoostLim_1200 = 0b010,
|
||||
BoostLim_1400 = 0b011,
|
||||
BoostLim_1650 = 0b100,
|
||||
BoostLim_1875 = 0b101,
|
||||
BoostLim_2150 = 0b110,
|
||||
BoostLim_Rsvd = 0b111,
|
||||
} BoostLim;
|
||||
|
||||
typedef struct {
|
||||
uint8_t BOOST_LIM : 3; // Boost Mode Current Limit
|
||||
|
||||
@@ -809,6 +809,8 @@ void nfc_worker_emulate_mf_ultralight(NfcWorker* nfc_worker) {
|
||||
emulator.auth_received_callback = nfc_worker_mf_ultralight_auth_received_callback;
|
||||
emulator.context = nfc_worker;
|
||||
|
||||
rfal_platform_spi_acquire();
|
||||
|
||||
while(nfc_worker->state == NfcWorkerStateMfUltralightEmulate) {
|
||||
mf_ul_reset_emulation(&emulator, true);
|
||||
furi_hal_nfc_emulate_nfca(
|
||||
@@ -828,6 +830,8 @@ void nfc_worker_emulate_mf_ultralight(NfcWorker* nfc_worker) {
|
||||
emulator.data_changed = false;
|
||||
}
|
||||
}
|
||||
|
||||
rfal_platform_spi_release();
|
||||
}
|
||||
|
||||
static bool nfc_worker_mf_get_b_key_from_sector_trailer(
|
||||
|
||||
Reference in New Issue
Block a user