mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-14 07:27:03 +03:00
More refactoring
- Display is a separated entity - Make battery configuration consistent with others - Led config part of led.c - Jack config moved to monitor.c
This commit is contained in:
39
components/display/tarablessd13x6/ssd13x6_err.h
Normal file
39
components/display/tarablessd13x6/ssd13x6_err.h
Normal file
@@ -0,0 +1,39 @@
|
||||
#ifndef _SSD13x6_ERR_H_
|
||||
#define _SSD13x6_ERR_H_
|
||||
|
||||
#include <esp_log.h>
|
||||
|
||||
#define SSD13x6_DoAbort( )
|
||||
|
||||
#if ! defined NullCheck
|
||||
#define NullCheck( ptr, retexpr ) { \
|
||||
if ( ptr == NULL ) { \
|
||||
ESP_LOGE( __FUNCTION__, "%s == NULL", #ptr ); \
|
||||
SSD13x6_DoAbort( ); \
|
||||
retexpr; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ! defined ESP_ERROR_CHECK_NONFATAL
|
||||
#define ESP_ERROR_CHECK_NONFATAL( expr, retexpr ) { \
|
||||
esp_err_t __err_rc = ( expr ); \
|
||||
if ( __err_rc != ESP_OK ) { \
|
||||
ESP_LOGE( __FUNCTION__, "%s != ESP_OK, result: %d", #expr, __err_rc ); \
|
||||
SSD13x6_DoAbort( ); \
|
||||
retexpr; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#if ! defined CheckBounds
|
||||
#define CheckBounds( expr, retexpr ) { \
|
||||
if ( expr ) { \
|
||||
ESP_LOGE( __FUNCTION__, "Line %d: %s", __LINE__, #expr ); \
|
||||
SSD13x6_DoAbort( ); \
|
||||
retexpr; \
|
||||
} \
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user