资源简介
附件为ssd1306控制器的驱动oled,调试ok,有需求的可下载。

代码片段和文件信息
#include “DalSsd1306.h“
#include “nrf_log.h“
#include “nrf_log_ctrl.h“
typedef struct
{
OPERATE_HANDLE pvI2cHandle;
}TDalOledMgr;
TDalOledMgr g_tDalOledMgr = {NULL};
#define DAL_OLED_WRITE_CMD 0x00 //write cmd
#define DAL_OLED_WRITE_DATA 0x40 // write data
#define OLED_INIT_TRANSFER_COUNT 1
#define DAL_OLED_RST_PIN_NUM (8) // oled reset pin
#define DAL_OLED_DIS_EN_PIN_NUM (2)
static uint8_t g_u8OledCtrl[] = {DAL_OLED_WRITE_CMDDAL_OLED_WRITE_DATA};
app_twi_transfer_t const g_u8OledWriteCmd = {
.p_data = &g_u8OledCtrl[0]
.length = 1
.operation = (DAL_OLED_SLAVE_ADDR << 1) | 0
.flags = 0
};
app_twi_transfer_t const g_u8OledWriteData = {
.p_data = &g_u8OledCtrl[1]
.length = 1
.operation = (DAL_OLED_SLAVE_ADDR << 1) | 1
.flags = 0
};
// oled init buffer
#ifdef USE_64_X_32_OLED
static uint8_t g_u8OledInitBuffer1[] = {0xAE0x000x120x000XB00x810xFF0xA10xA60xA8 };
static uint8_t g_u8OledInitBuffer2[] = {0x1F0xC80xD30x000xD50x800xD90x1F0xDA0x12};
static uint8_t g_u8OledInitBuffer3[] = {0xDB0X400x8D0x140xAF };
#else
static uint8_t g_u8OledInitBuffer1[] = {0xAE0xD50xF00xA80X270xD30x000x400x8D0x10 };
static uint8_t g_u8OledInitBuffer2[] = {0x200x020xA10xC80xDA0x120xAD0x300x810xFF};
static uint8_t g_u8OledInitBuffer3[] = {0xD90X220xDB0x200xA40xA60x0C0x110xAF};
//static uint8_t g_u8OledInitBuffer1[] = {0xAE0x000x100x400XB00x810x2F0xA10xA6};
//static uint8_t g_u8OledInitBuffer2[] = {0xA80x270xC80xD30x000xD50xF00xD80x050xD90x22};
//static uint8_t g_u8OledInitBuffer3[] = {0xDA0x120xDB0x200x8D0x100xAF };
#endif
app_twi_transfer_t const g_u8OledInit1 =
{
.p_data = &g_u8OledInitBuffer1[0]
.length = sizeof(g_u8OledInitBuffer1)
.operation = (DAL_OLED_SLAVE_ADDR << 1) | 0
.flags = 0
};
app_twi_transfer_t const g_u8OledInit2 =
{
.p_data = &g_u8OledInitBuffer2[0]
.length = sizeof(g_u8OledInitBuffer2)
.operation = (DAL_OLED_SLAVE_ADDR << 1) | 0
.flags = 0
};
app_twi_transfer_t const g_u8OledInit3 =
{
.p_data = &g_u8OledInitBuffer3[0]
.length = sizeof(g_u8OledInitBuffer3)
.operation = (DAL_OLED_SLAVE_ADDR << 1) | 0
.flags = 0
};
//uint8_t g_u8OledGram[DAL_OLED_COLUM][DAL_OLED_PAGE];
static uint32_t u32DalOledInit(void);
static EErrorCodeInf eDalOledOpen(void* pvArgs pvDevIntCallBackFun pfOledIntCb);
static void vDalOledTransBufferCreat(app_twi_transfer_t * ptDataStructuint8_t u8RdOrWrite uint8_t * pu8Datauint32_t u32DataLen);
//static void vDalOledGramRefresh(void) ;
static void vDalOledClearScreen(void);
static uint32_t u32DalOledWriteCmd(uint8_t* u8CmdBufferuint32_t u32CmdLen);
static EErrorCodeInf eDalOledCtrl(EDevCmd eCmd void* pvArg);
static void vDalOledAllOn(void);
/******************************************************************************/
/
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 26508 2018-07-19 13:57 SSD1306驱动Oled\DalSsd1306.c
文件 992 2018-06-27 11:26 SSD1306驱动Oled\DalSsd1306.h
目录 0 2018-07-27 13:29 SSD1306驱动Oled
----------- --------- ---------- ----- ----
27500 3
相关资源
- Micrium.RTOS.1.0.0.pack
- ISE_14.7_license.lic
- stm32f103c8t6 4 oled.rar
- mpu6050+hmc5883L.rar
- 嵌入式图形界面MiniGUI的示例程序9例
- ARM嵌入式项目实战
- uCOS编译环境建立 BC45 TASM
- stm32 用SPI 方式读写 SDHC
- 自动售货机的内部嵌入式系统
- 51单片机中使用ucos ii的优缺点
- 嵌入式实时操作系统ucos-II 第二版 源
- 基于串口设备的嵌入式Web服务器系统
- 基于LW IP的嵌入式串口服务器的设计与
- 一种嵌入式串口共享服务器的设计
- 21天学会嵌入式开发STM32.zip
- 嵌入式智能平台为城市一卡通打造智
- 研祥“EVOC”嵌入式智能平台在
- ARM7TDMI-S在嵌入式系统中的Bootloader代码
- LPC2000系列微控制器应对嵌入式需求
- 嵌入式实时操作系统μC/OS-II与eCos的
- 基于STM32的嵌入式双目图像采集系统设
- 嵌入式实时操作系统在DATU中的应用
- 嵌入式实时操作系统μC/OS-II下通用驱
- 嵌入式实时操作系统μC/OS-II在ARM上的
- 嵌入式操作系统的解析
- SAC型液压支架控制器检测平台的设计
- 一种用ARM7+UC/OS-II设计的信号采集系统
- 最简单的平衡小车
- 基于ARM的电子相册源码含动态库可运
- 嵌入式工程师周报 项目管理 甘特图
评论
共有 条评论