merge fix [ci skip]

with some parts from PR by Willy-JL
https://github.com/flipperdevices/flipperzero-firmware/pull/3980/files
This commit is contained in:
MX
2024-11-01 05:30:33 +03:00
parent 04c8093672
commit 3c6a621da2
15 changed files with 64 additions and 489 deletions

View File

@@ -0,0 +1,30 @@
/**
* @brief Acquire SPI bus
*/
export declare function acquire(): void;
/**
* @brief Release SPI bus
*/
export declare function release(): void;
/**
* @brief Write data to SPI bus and return success status
* @param data The data to write
* @param timeout Timeout in milliseconds
*/
export declare function write(data: number[] | ArrayBuffer, timeout?: number): boolean;
/**
* @brief Read data from SPI bus or return undefined on failure
* @param length How many bytes to read
* @param timeout Timeout in milliseconds
*/
export declare function read(length: number, timeout?: number): ArrayBuffer | undefined;
/**
* @brief Write and read data on SPI bus or return undefined on failure
* @param data The data to write, its length also indicates how many bytes will be read
* @param timeout Timeout in milliseconds
*/
export declare function writeRead(data: number[] | ArrayBuffer, timeout?: number): ArrayBuffer | undefined;