fix bit namings
Signed-off-by: Mikhail Sazanov <m@sazanof.ru>
This commit is contained in:
parent
f31812c007
commit
5d32db673d
2 changed files with 5 additions and 5 deletions
|
@ -507,7 +507,7 @@ bool esp_ot_send_request_async(unsigned long request)
|
||||||
esp_ot_send_bit(1); // start bit
|
esp_ot_send_bit(1); // start bit
|
||||||
for (int i = 31; i >= 0; i--)
|
for (int i = 31; i >= 0; i--)
|
||||||
{
|
{
|
||||||
esp_ot_send_bit(bitRead(request, i));
|
esp_ot_send_bit(ESP_OT_BIT_READ(request, i));
|
||||||
}
|
}
|
||||||
esp_ot_send_bit(1); // stop bit
|
esp_ot_send_bit(1); // stop bit
|
||||||
esp_ot_set_idle_state();
|
esp_ot_set_idle_state();
|
||||||
|
@ -818,7 +818,7 @@ bool esp_ot_send_response(unsigned long request)
|
||||||
esp_ot_send_bit(1); // start bit
|
esp_ot_send_bit(1); // start bit
|
||||||
for (int i = 31; i >= 0; i--)
|
for (int i = 31; i >= 0; i--)
|
||||||
{
|
{
|
||||||
esp_ot_send_bit(bitRead(request, i));
|
esp_ot_send_bit(ESP_OT_BIT_READ(request, i));
|
||||||
}
|
}
|
||||||
esp_ot_send_bit(1); // stop bit
|
esp_ot_send_bit(1); // stop bit
|
||||||
esp_ot_set_idle_state();
|
esp_ot_set_idle_state();
|
||||||
|
|
|
@ -15,9 +15,9 @@ static portMUX_TYPE mux = portMUX_INITIALIZER_UNLOCKED;
|
||||||
#define PORT_ENTER_CRITICAL portENTER_CRITICAL(&mux)
|
#define PORT_ENTER_CRITICAL portENTER_CRITICAL(&mux)
|
||||||
#define PORT_EXIT_CRITICAL portEXIT_CRITICAL(&mux)
|
#define PORT_EXIT_CRITICAL portEXIT_CRITICAL(&mux)
|
||||||
|
|
||||||
#ifndef bit
|
#ifndef ESP_OT_BIT
|
||||||
#define bit(b) (1UL << (b))
|
#define ESP_OT_BIT(b) (1UL << (b))
|
||||||
#define bitRead(value, bit) ((value >> bit) & 0x01)
|
#define ESP_OT_BIT_READ(value, ESP_OT_BIT) ((value >> ESP_OT_BIT) & 0x01)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ENUMS
|
// ENUMS
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue