Rename api-hal to furi-hal (#629)
This commit is contained in:
@@ -2,12 +2,12 @@
|
||||
#include <assert.h>
|
||||
#include <main.h>
|
||||
#include <furi.h>
|
||||
#include <api-hal-spi.h>
|
||||
#include <furi-hal-spi.h>
|
||||
|
||||
static osThreadAttr_t platform_irq_thread_attr;
|
||||
static volatile osThreadId_t platform_irq_thread_id = NULL;
|
||||
static volatile PlatformIrqCallback platform_irq_callback = NULL;
|
||||
static ApiHalSpiDevice* platform_st25r3916 = NULL;
|
||||
static FuriHalSpiDevice* platform_st25r3916 = NULL;
|
||||
static const GpioPin pin = {ST25R_INT_PORT, ST25R_INT_PIN};
|
||||
|
||||
void nfc_isr(void* _ctx) {
|
||||
@@ -52,11 +52,11 @@ HAL_StatusTypeDef platformSpiTxRx(const uint8_t *txBuf, uint8_t *rxBuf, uint16_t
|
||||
furi_assert(platform_st25r3916);
|
||||
bool ret = false;
|
||||
if (txBuf && rxBuf) {
|
||||
ret = api_hal_spi_bus_trx(platform_st25r3916->bus, (uint8_t*)txBuf, rxBuf, len, 1000);
|
||||
ret = furi_hal_spi_bus_trx(platform_st25r3916->bus, (uint8_t*)txBuf, rxBuf, len, 1000);
|
||||
} else if (txBuf) {
|
||||
ret = api_hal_spi_bus_tx(platform_st25r3916->bus, (uint8_t*)txBuf, len, 1000);
|
||||
ret = furi_hal_spi_bus_tx(platform_st25r3916->bus, (uint8_t*)txBuf, len, 1000);
|
||||
} else if (rxBuf) {
|
||||
ret = api_hal_spi_bus_rx(platform_st25r3916->bus, (uint8_t*)rxBuf, len, 1000);
|
||||
ret = furi_hal_spi_bus_rx(platform_st25r3916->bus, (uint8_t*)rxBuf, len, 1000);
|
||||
}
|
||||
|
||||
if(!ret) {
|
||||
@@ -68,10 +68,10 @@ HAL_StatusTypeDef platformSpiTxRx(const uint8_t *txBuf, uint8_t *rxBuf, uint16_t
|
||||
}
|
||||
|
||||
void platformProtectST25RComm() {
|
||||
platform_st25r3916 = (ApiHalSpiDevice*)api_hal_spi_device_get(ApiHalSpiDeviceIdNfc);
|
||||
platform_st25r3916 = (FuriHalSpiDevice*)furi_hal_spi_device_get(FuriHalSpiDeviceIdNfc);
|
||||
}
|
||||
|
||||
void platformUnprotectST25RComm() {
|
||||
furi_assert(platform_st25r3916);
|
||||
api_hal_spi_device_return(platform_st25r3916);
|
||||
furi_hal_spi_device_return(platform_st25r3916);
|
||||
}
|
||||
|
@@ -10,9 +10,9 @@
|
||||
#include "math.h"
|
||||
#include "spi.h"
|
||||
#include "main.h"
|
||||
#include <api-hal-gpio.h>
|
||||
#include <api-hal-light.h>
|
||||
#include <api-hal-spi.h>
|
||||
#include <furi-hal-gpio.h>
|
||||
#include <furi-hal-light.h>
|
||||
#include <furi-hal-spi.h>
|
||||
|
||||
typedef void (*PlatformIrqCallback)();
|
||||
void platformSetIrqCallback(PlatformIrqCallback cb);
|
||||
|
Reference in New Issue
Block a user