3 files changed
+28
-4
No files matched your search
+2
-1
@@ -7,7 +7,8 @@
|
||||
- Remove Gap.connected(), Gap.getRole() in prefer to BLEConnection API
|
||||
- Added setRssiCallback(), monitorRssi(), getRssi(), stopRssi() for tracking rssi of a connection
|
||||
- rssi_poll and rssi_callback example sketches are added
|
||||
- Change BLECharacteristic callback signature BLECharacteristic& to BLECharacteristic*
|
||||
- Change BLECharacteristic callback signature BLECharacteristic& to BLECharacteristic*
|
||||
- Use AdaCallback thread for BLECharacteristic callbacks
|
||||
|
||||
# 0.9.3
|
||||
|
||||
|
||||
@@ -23,6 +23,28 @@
|
||||
// See pulse_asm.S
|
||||
extern unsigned long countPulseASM(const volatile uint32_t *port, uint32_t bit, uint32_t stateMask, unsigned long maxloops);
|
||||
|
||||
unsigned long countPulseASM(const volatile uint32_t *port, uint32_t bit, uint32_t stateMask, unsigned long maxloops)
|
||||
{
|
||||
unsigned long width = 0;
|
||||
|
||||
// wait for any previous pulse to end
|
||||
while ((*port & bit) == stateMask)
|
||||
if (--maxloops == 0)
|
||||
return 0;
|
||||
|
||||
// wait for the pulse to start
|
||||
while ((*port & bit) != stateMask)
|
||||
if (--maxloops == 0)
|
||||
return 0;
|
||||
|
||||
// wait for the pulse to stop
|
||||
while ((*port & bit) == stateMask) {
|
||||
if (++width == maxloops)
|
||||
return 0;
|
||||
}
|
||||
return width;
|
||||
}
|
||||
|
||||
/* Measures the length (in microseconds) of a pulse on the pin; state is HIGH
|
||||
* or LOW, the type of pulse to measure. Works on pulses from 2-3 microseconds
|
||||
* to 3 minutes in length, but must be called at least a few dozen microseconds
|
||||
|
||||
@@ -58,9 +58,9 @@ using the command line:
|
||||
The result has been slightly edited to increase readability.
|
||||
|
||||
*/
|
||||
|
||||
.cpu cortex-m0plus
|
||||
.fpu softvfp
|
||||
/*
|
||||
.cpu cortex-m4
|
||||
.fpu fpv4-sp-d16
|
||||
.eabi_attribute 20, 1 @ Tag_ABI_FP_denormal
|
||||
.eabi_attribute 21, 1 @ Tag_ABI_FP_exceptions
|
||||
.eabi_attribute 23, 3 @ Tag_ABI_FP_number_model
|
||||
@@ -173,3 +173,4 @@ countPulseASM:
|
||||
pop {r4, r5, pc}
|
||||
.size countPulseASM, .-countPulseASM
|
||||
.ident "GCC: (GNU Tools for ARM Embedded Processors (Arduino build)) 4.8.3 20140228 (release) [ARM/embedded-4_8-branch revision 208322]"
|
||||
*/
|
||||
Reference in new issue
Block a user