Changeset - 0f9d3eff7dfc
[Not reviewed]
bsp.h
Show inline comments
 
file renamed from libraries/oleddrv/bsp.h to bsp.h
libraries/oleddrv/DrawText.c
Show inline comments
 
deleted file
libraries/oleddrv/DrawText.h
Show inline comments
 
deleted file
libraries/oleddrv/Encoder.c
Show inline comments
 
deleted file
libraries/oleddrv/Encoder.h
Show inline comments
 
deleted file
libraries/oleddrv/GraphicsConfig.h
Show inline comments
 
deleted file
libraries/oleddrv/HardwareProfile.h
Show inline comments
 
deleted file
libraries/oleddrv/StringResource.c
Show inline comments
 
deleted file
libraries/oleddrv/StringResource.h
Show inline comments
 
deleted file
libraries/oleddrv/UserMenu.c
Show inline comments
 
deleted file
libraries/oleddrv/cortexm3_macro.s
Show inline comments
 
deleted file
libraries/oleddrv/font.c
Show inline comments
 
deleted file
libraries/oleddrv/font.h
Show inline comments
 
deleted file
libraries/oleddrv/font/SongSmall5.c
Show inline comments
 
deleted file
libraries/oleddrv/main.c
Show inline comments
 
deleted file
libraries/oleddrv/menu.c
Show inline comments
 
deleted file
libraries/oleddrv/menu.h
Show inline comments
 
deleted file
main.c
Show inline comments
 
@@ -64,12 +64,13 @@ int main(void)
 
    Delay(500);
 
    GPIO_ResetBits(LED_POWER);
 
 
    init_spi();
 
 
    ssd1306_Init();
 
    ssd1306_block_write();
 
    ssd1306_DrawString("Hello World!", 0, 10);
 
  //  ssd1306_block_write();
 
 
    while(1)
 
   {  
 
        //ssd1306_block_write();
 
@@ -87,13 +88,13 @@ int main(void)
 
        uint8_t sw_down = GPIO_ReadInputDataBit(SW_DOWN);
 
        uint8_t sw_left = GPIO_ReadInputDataBit(SW_LEFT);
 
        uint8_t sw_right = GPIO_ReadInputDataBit(SW_RIGHT);
 
 
        if(!sw_btn) {
 
            GPIO_ToggleBits(LED_STAT);
 
            ssd1306_block_write();
 
            ssd1306_DrawString("Douche!", 2, 10);
 
        }
 
 
        GPIO_SetBits(LED_POWER);
 
        Delay(50);
 
        GPIO_ResetBits(LED_POWER);
 
        Delay(50);
ssd1306.c
Show inline comments
 
@@ -8,14 +8,12 @@
 
*******************************************************************************/
 
 
/* Includes ------------------------------------------------------------------*/
 
#include "stm32l100c_discovery.h"
 
#include "bsp.h"
 
#include "ssd1306.h"
 
#include "DrawText.h"
 
#include "smallfonts.h"
 
 
/* Private typedef -----------------------------------------------------------*/
 
/* Private define ------------------------------------------------------------*/
 
#define   SSD1306_PAGE_NUMBER           8
 
#define   SSD1306_COLUMN_NUMBER         128
 
#define   SSD1306_COLUMN_MARGIN_START   2
ssd1306.h
Show inline comments
 
#ifndef   ssd1306_H
 
#define   ssd1306_H
 
#include "DrawText.h"
 
 
typedef unsigned long Pos_t;
 
typedef unsigned long Size_t;
 
typedef unsigned long Color_t;
 
 
typedef   unsigned long  (*pfnDrawBlock_t)(
 
  Pos_t x,
 
  Pos_t y,
 
  Pos_t cx,
 
  Pos_t cy,
 
  const unsigned char* data);
 
typedef   unsigned long  (*pfnDrawPoint_t)(Pos_t x, Pos_t y, Color_t color);
 
 
 
typedef unsigned long(*pfnFontDrawChar)(pfnDrawBlock_t DrawBlock,Pos_t x, Pos_t y, unsigned int ch);
 
 
 
 
 
typedef  struct _DeviceProp
 
{
 
  pfnDrawBlock_t    pfnDrawBlok;
 
  pfnDrawPoint_t    pfnDrawPoint;
 
  Size_t            xPixel;
 
  Size_t            yPixel;
 
}DeviceProp;
 
 
typedef  struct  _Device
 
{
 
  const DeviceProp*   pDevProp;
 
  pfnFontDrawChar     pfnFont;
 
  Pos_t               curX;
 
  Pos_t               curY;
 
}Device;
 
 
 
void  ssd1306_Init(void);
 
void  StartPageTransfer(void);
 
extern  const DeviceProp  ssd1306_Prop;
 
unsigned long ssd1306_DrawBlock(Pos_t x, Pos_t y, Pos_t cx, Pos_t cy, const unsigned char* data);
 
unsigned long ssd1306_IsOn(void);
0 comments (0 inline, 0 general)