update emulator

This commit is contained in:
Shuanglei Tao
2025-05-19 17:08:57 +08:00
parent b19a7800c4
commit 37c2fc8504
4 changed files with 11 additions and 27 deletions

View File

@@ -272,7 +272,7 @@ void EPD_LED_BLINK(void)
float EPD_ReadVoltage(void)
{
#if defined(S112)
#if defined(S112)
volatile int16_t value = 0;
NRF_SAADC->RESOLUTION = SAADC_RESOLUTION_VAL_10bit;
NRF_SAADC->ENABLE = (SAADC_ENABLE_ENABLE_Enabled << SAADC_ENABLE_ENABLE_Pos);

View File

@@ -90,10 +90,6 @@ void UC8176_Force_Temp(int8_t value)
EPD_WriteByte(value);
}
/******************************************************************************
function : Turn On Display
parameter:
******************************************************************************/
void UC8176_Refresh(void)
{
NRF_LOG_DEBUG("[EPD]: refresh begin\n");
@@ -106,10 +102,6 @@ void UC8176_Refresh(void)
NRF_LOG_DEBUG("[EPD]: refresh end\n");
}
/******************************************************************************
function : Initialize the e-Paper register
parameter:
******************************************************************************/
void UC8176_Init()
{
EPD_Reset(HIGH, 10);
@@ -149,10 +141,6 @@ static void UC8176_Write_RAM(uint8_t cmd, uint8_t value)
}
}
/******************************************************************************
function : Clear screen
parameter:
******************************************************************************/
void UC8176_Clear(void)
{
UC8176_Write_RAM(CMD_DTM1, 0xFF);
@@ -209,10 +197,6 @@ void UC8176_Write_Image(uint8_t *black, uint8_t *color, uint16_t x, uint16_t y,
EPD_WriteCommand(CMD_PTOUT); // partial out
}
/******************************************************************************
function : Enter sleep mode
parameter:
******************************************************************************/
void UC8176_Sleep(void)
{
UC8176_PowerOff();

View File

@@ -7,7 +7,7 @@
#define BITMAP_WIDTH 400
#define BITMAP_HEIGHT 300
#define WINDOW_WIDTH 400
#define WINDOW_WIDTH 420
#define WINDOW_HEIGHT 340
#define WINDOW_TITLE TEXT("Emurator")

18
main.c
View File

@@ -55,16 +55,16 @@
#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
#if defined(S112)
#define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */
#define APP_BLE_OBSERVER_PRIO 3 /**< Application's BLE observer priority. You shouldn't need to modify this value. */
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS)
#define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */
#define APP_BLE_OBSERVER_PRIO 3 /**< Application's BLE observer priority. You shouldn't need to modify this value. */
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS)
#else
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS, APP_TIMER_PRESCALER)
// Low frequency clock source to be used by the SoftDevice
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
.rc_ctiv = 0, \
.rc_temp_ctiv = 0, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS, APP_TIMER_PRESCALER)
// Low frequency clock source to be used by the SoftDevice
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
.rc_ctiv = 0, \
.rc_temp_ctiv = 0, \
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
#endif
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**< Minimum connection interval (7.5 ms) */