mirror of
https://github.com/tsl0922/EPD-nRF5.git
synced 2025-12-09 16:08:13 +08:00
update emulator
This commit is contained in:
@@ -272,7 +272,7 @@ void EPD_LED_BLINK(void)
|
|||||||
|
|
||||||
float EPD_ReadVoltage(void)
|
float EPD_ReadVoltage(void)
|
||||||
{
|
{
|
||||||
#if defined(S112)
|
#if defined(S112)
|
||||||
volatile int16_t value = 0;
|
volatile int16_t value = 0;
|
||||||
NRF_SAADC->RESOLUTION = SAADC_RESOLUTION_VAL_10bit;
|
NRF_SAADC->RESOLUTION = SAADC_RESOLUTION_VAL_10bit;
|
||||||
NRF_SAADC->ENABLE = (SAADC_ENABLE_ENABLE_Enabled << SAADC_ENABLE_ENABLE_Pos);
|
NRF_SAADC->ENABLE = (SAADC_ENABLE_ENABLE_Enabled << SAADC_ENABLE_ENABLE_Pos);
|
||||||
|
|||||||
16
EPD/UC8176.c
16
EPD/UC8176.c
@@ -90,10 +90,6 @@ void UC8176_Force_Temp(int8_t value)
|
|||||||
EPD_WriteByte(value);
|
EPD_WriteByte(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
function : Turn On Display
|
|
||||||
parameter:
|
|
||||||
******************************************************************************/
|
|
||||||
void UC8176_Refresh(void)
|
void UC8176_Refresh(void)
|
||||||
{
|
{
|
||||||
NRF_LOG_DEBUG("[EPD]: refresh begin\n");
|
NRF_LOG_DEBUG("[EPD]: refresh begin\n");
|
||||||
@@ -106,10 +102,6 @@ void UC8176_Refresh(void)
|
|||||||
NRF_LOG_DEBUG("[EPD]: refresh end\n");
|
NRF_LOG_DEBUG("[EPD]: refresh end\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
function : Initialize the e-Paper register
|
|
||||||
parameter:
|
|
||||||
******************************************************************************/
|
|
||||||
void UC8176_Init()
|
void UC8176_Init()
|
||||||
{
|
{
|
||||||
EPD_Reset(HIGH, 10);
|
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)
|
void UC8176_Clear(void)
|
||||||
{
|
{
|
||||||
UC8176_Write_RAM(CMD_DTM1, 0xFF);
|
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
|
EPD_WriteCommand(CMD_PTOUT); // partial out
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************************
|
|
||||||
function : Enter sleep mode
|
|
||||||
parameter:
|
|
||||||
******************************************************************************/
|
|
||||||
void UC8176_Sleep(void)
|
void UC8176_Sleep(void)
|
||||||
{
|
{
|
||||||
UC8176_PowerOff();
|
UC8176_PowerOff();
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
#define BITMAP_WIDTH 400
|
#define BITMAP_WIDTH 400
|
||||||
#define BITMAP_HEIGHT 300
|
#define BITMAP_HEIGHT 300
|
||||||
#define WINDOW_WIDTH 400
|
#define WINDOW_WIDTH 420
|
||||||
#define WINDOW_HEIGHT 340
|
#define WINDOW_HEIGHT 340
|
||||||
#define WINDOW_TITLE TEXT("Emurator")
|
#define WINDOW_TITLE TEXT("Emurator")
|
||||||
|
|
||||||
|
|||||||
18
main.c
18
main.c
@@ -55,16 +55,16 @@
|
|||||||
#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
|
#define APP_TIMER_OP_QUEUE_SIZE 4 /**< Size of timer operation queues. */
|
||||||
|
|
||||||
#if defined(S112)
|
#if defined(S112)
|
||||||
#define APP_BLE_CONN_CFG_TAG 1 /**< A tag identifying the SoftDevice BLE configuration. */
|
#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 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 TIMER_TICKS(MS) APP_TIMER_TICKS(MS)
|
||||||
#else
|
#else
|
||||||
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS, APP_TIMER_PRESCALER)
|
#define TIMER_TICKS(MS) APP_TIMER_TICKS(MS, APP_TIMER_PRESCALER)
|
||||||
// Low frequency clock source to be used by the SoftDevice
|
// Low frequency clock source to be used by the SoftDevice
|
||||||
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
|
#define NRF_CLOCK_LFCLKSRC {.source = NRF_CLOCK_LF_SRC_SYNTH, \
|
||||||
.rc_ctiv = 0, \
|
.rc_ctiv = 0, \
|
||||||
.rc_temp_ctiv = 0, \
|
.rc_temp_ctiv = 0, \
|
||||||
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
.xtal_accuracy = NRF_CLOCK_LF_XTAL_ACCURACY_20_PPM}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**< Minimum connection interval (7.5 ms) */
|
#define MIN_CONN_INTERVAL MSEC_TO_UNITS(7.5, UNIT_1_25_MS) /**< Minimum connection interval (7.5 ms) */
|
||||||
|
|||||||
Reference in New Issue
Block a user