Преглед на файлове

Merge nrf24scan from https://github.com/xMasterX/all-the-plugins

# Conflicts:
#	nrf24scan/lib/nrf24/nrf24.c
#	nrf24scan/lib/nrf24/nrf24.h
Willy-JL преди 10 месеца
родител
ревизия
75366922b6
променени са 3 файла, в които са добавени 10 реда и са изтрити 29 реда
  1. 1 1
      nrf24scan/.gitsubtree
  2. 4 14
      nrf24scan/lib/nrf24/nrf24.c
  3. 5 14
      nrf24scan/lib/nrf24/nrf24.h

+ 1 - 1
nrf24scan/.gitsubtree

@@ -1,2 +1,2 @@
-https://github.com/xMasterX/all-the-plugins dev non_catalog_apps/nrf24scan 4558d74c9da36abc851edd96a95d18f7d5511a75
+https://github.com/xMasterX/all-the-plugins dev non_catalog_apps/nrf24scan 8bc18d5d99262484548b6bbc92690a1472c329a0
 https://github.com/vad7/nrf24scan master /

+ 4 - 14
nrf24scan/lib/nrf24/nrf24.c

@@ -57,11 +57,7 @@ uint8_t nrf24_write_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t
     return rx[0];
 }
 
-uint8_t nrf24_write_buf_reg(
-    const FuriHalSpiBusHandle* handle,
-    uint8_t reg,
-    uint8_t* data,
-    uint8_t size) {
+uint8_t nrf24_write_buf_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size) {
     uint8_t tx[size + 1];
     uint8_t rx[size + 1];
     memset(rx, 0, size + 1);
@@ -72,8 +68,7 @@ uint8_t nrf24_write_buf_reg(
     return rx[0];
 }
 
-uint8_t
-    nrf24_read_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size) {
+uint8_t nrf24_read_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size) {
     uint8_t tx[size + 1];
     uint8_t rx[size + 1];
     memset(rx, 0, size + 1);
@@ -211,11 +206,7 @@ uint8_t nrf24_set_packetlen(const FuriHalSpiBusHandle* handle, uint8_t len) {
     return status;
 }
 
-uint8_t nrf24_rxpacket(
-    const FuriHalSpiBusHandle* handle,
-    uint8_t* packet,
-    uint8_t* ret_packetsize,
-    uint8_t packet_size) {
+uint8_t nrf24_rxpacket(const FuriHalSpiBusHandle* handle, uint8_t* packet, uint8_t* ret_packetsize, uint8_t packet_size) {
     uint8_t status = 0;
     uint8_t tx_cmd[33] = {0}; // 32 max payload size + 1 for command
     uint8_t tmp_packet[33] = {0};
@@ -250,8 +241,7 @@ uint8_t nrf24_rxpacket(
 }
 
 // Return 0 when error
-uint8_t
-    nrf24_txpacket(const FuriHalSpiBusHandle* handle, uint8_t* payload, uint8_t size, bool ack) {
+uint8_t nrf24_txpacket(const FuriHalSpiBusHandle* handle, uint8_t* payload, uint8_t size, bool ack) {
     uint8_t status = 0;
     uint8_t tx[size + 1];
     uint8_t rx[size + 1];

+ 5 - 14
nrf24scan/lib/nrf24/nrf24.h

@@ -78,11 +78,7 @@ uint8_t nrf24_write_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t
  *
  * @return     device status
  */
-uint8_t nrf24_write_buf_reg(
-    const FuriHalSpiBusHandle* handle,
-    uint8_t reg,
-    uint8_t* data,
-    uint8_t size);
+uint8_t nrf24_write_buf_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size);
 
 /** Read device register
  *
@@ -92,8 +88,7 @@ uint8_t nrf24_write_buf_reg(
  *
  * @return     device status
  */
-uint8_t
-    nrf24_read_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size);
+uint8_t nrf24_read_reg(const FuriHalSpiBusHandle* handle, uint8_t reg, uint8_t* data, uint8_t size);
 
 /** Power up the radio for operation
  * 
@@ -281,11 +276,8 @@ uint8_t nrf24_set_dst_mac(const FuriHalSpiBusHandle* handle, uint8_t* mac, uint8
  * 
  * @return     device status
  */
-uint8_t nrf24_rxpacket(
-    const FuriHalSpiBusHandle* handle,
-    uint8_t* packet,
-    uint8_t* ret_packetsize,
-    uint8_t packet_size_flag);
+uint8_t
+    nrf24_rxpacket(const FuriHalSpiBusHandle* handle, uint8_t* packet, uint8_t* ret_packetsize, uint8_t packet_size_flag);
 
 /** Sends TX packet
  *
@@ -296,8 +288,7 @@ uint8_t nrf24_rxpacket(
  * 
  * @return     device status
  */
-uint8_t
-    nrf24_txpacket(const FuriHalSpiBusHandle* handle, uint8_t* payload, uint8_t size, bool ack);
+uint8_t nrf24_txpacket(const FuriHalSpiBusHandle* handle, uint8_t* payload, uint8_t size, bool ack);
 
 /** Configure the radio
  * This is not comprehensive, but covers a lot of the common configuration options that may be changed