[FL-1196] Targets: add F6 (#427)
* Targets: add F6 * F6: Update linker script for use with internal storage * F6: synchronize with F5, add all changes arriving in V9 board, update cube project. Github workflow: add multi-target build, add F6 to build targets. * CI: fix full assembly * CI: better artifact naming scheme * CI: fix artifacts wildcard * F6: Swap C10 - A15, vibro and sdcard detect pins
This commit is contained in:
43
bootloader/targets/f6/api-hal/api-hal-i2c.h
Normal file
43
bootloader/targets/f6/api-hal/api-hal-i2c.h
Normal file
@@ -0,0 +1,43 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include <api-hal-resources.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
void api_hal_i2c_init();
|
||||
|
||||
bool api_hal_i2c_tx(
|
||||
I2C_TypeDef* instance,
|
||||
const uint8_t address,
|
||||
const uint8_t* data,
|
||||
const uint8_t size,
|
||||
uint32_t timeout);
|
||||
|
||||
bool api_hal_i2c_rx(
|
||||
I2C_TypeDef* instance,
|
||||
const uint8_t address,
|
||||
uint8_t* data,
|
||||
const uint8_t size,
|
||||
uint32_t timeout);
|
||||
|
||||
bool api_hal_i2c_trx(
|
||||
I2C_TypeDef* instance,
|
||||
const uint8_t address,
|
||||
const uint8_t* tx_data,
|
||||
const uint8_t tx_size,
|
||||
uint8_t* rx_data,
|
||||
const uint8_t rx_size,
|
||||
uint32_t timeout);
|
||||
|
||||
#define with_api_hal_i2c(type, pointer, function_body) \
|
||||
{ \
|
||||
*pointer = ({ type __fn__ function_body __fn__; })(); \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
Reference in New Issue
Block a user