Hexiwear OLED Display Driver
Dependents: Hexi_OLED_TextImage_Example Hexi_OLED_Text_Example Hexi_OLED_Image_Example security-console-app ... more
Diff: Hexi_OLED_SSD1351.h
- Revision:
- 6:0060ffa3f4dc
- Parent:
- 5:a5b4b36a1aed
- Child:
- 7:9961c525e249
--- a/Hexi_OLED_SSD1351.h Fri Aug 26 18:13:10 2016 +0000 +++ b/Hexi_OLED_SSD1351.h Fri Aug 26 19:56:07 2016 +0000 @@ -91,10 +91,10 @@ * @return status flag */ oled_status_t DrawBox ( - uint16_t xCrd, - uint16_t yCrd, - uint16_t width, - uint16_t height, + int8_t xCrd, + int8_t yCrd, + uint8_t width, + uint8_t height, uint16_t color ); @@ -114,8 +114,8 @@ * @return status flag */ oled_status_t DrawPixel ( - int16_t xCrd, - int16_t yCrd, + int8_t xCrd, + int8_t yCrd, uint16_t color ); @@ -132,8 +132,8 @@ */ oled_status_t DrawScreen ( const uint8_t* image, - uint8_t xCrd, - uint8_t yCrd, + int8_t xCrd, + int8_t yCrd, uint8_t width, uint8_t height, oled_transition_t transition @@ -196,7 +196,7 @@ * @param yCrd y-coordinate for the given text * @return status flag */ - oled_status_t AddText( const uint8_t* text,uint8_t xCrd, uint8_t yCrd ); + oled_status_t AddText( const uint8_t* text,int8_t xCrd, int8_t yCrd ); /** * Add text to the main screen buffer. Used with SetDynamicArea() Function. * @param text text to add @@ -233,7 +233,7 @@ * @param yCrd image y-coordinate * @return status flag */ - oled_status_t AddImage ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd ); + oled_status_t AddImage ( const uint8_t* image, int8_t xCrd, int8_t yCrd ); /** * Send image to OLED GRAM.Used with SetDynamicArea() Function for positioning image. @@ -248,7 +248,7 @@ * @param yCrd image y-coordinate * @return status flag */ - oled_status_t DrawImage ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd ); + oled_status_t DrawImage ( const uint8_t* image, int8_t xCrd, int8_t yCrd ); /** * Dim OLED screen on @@ -294,8 +294,8 @@ * @param image image for buffer */ void UpdateBuffer ( - uint8_t xCrd, - uint8_t yCrd, + int8_t xCrd, + int8_t yCrd, uint8_t width, uint8_t height, const uint8_t* image @@ -310,8 +310,8 @@ */ oled_status_t Label(const uint8_t* text, - uint8_t xCrd, - uint8_t yCrd ); + int8_t xCrd, + int8_t yCrd ); /** * Create a text box of width,height at position x,y. Recommended for Dynamic Text. @@ -324,8 +324,8 @@ */ oled_status_t TextBox(const uint8_t* text, - uint8_t xCrd, - uint8_t yCrd, + int8_t xCrd, + int8_t yCrd, uint8_t width, uint8_t height); @@ -342,7 +342,6 @@ const uint8_t* selectedFont; uint8_t - isFontInitialized, currentChar_width, currentChar_height, screenBuf[OLED_GRAM_SIZE]; @@ -360,11 +359,11 @@ //Internal Functions void Transpose( oled_pixel_t transImage, const oled_pixel_t image, uint8_t width, uint8_t height ); - oled_status_t TopDown ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd, uint8_t width, uint8_t height ); - oled_status_t DownTop ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd, uint8_t width, uint8_t height ); - oled_status_t LeftRight ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd, uint8_t width, uint8_t height ); - oled_status_t RightLeft ( const uint8_t* image, uint8_t xCrd, uint8_t yCrd, uint8_t width, uint8_t height ); - void SetBorders( uint8_t xCrd, uint8_t yCrd, uint8_t width, uint8_t height ); + oled_status_t TopDown ( const uint8_t* image, int8_t xCrd, int8_t yCrd, uint8_t width, uint8_t height ); + oled_status_t DownTop ( const uint8_t* image, int8_t xCrd, int8_t yCrd, uint8_t width, uint8_t height ); + oled_status_t LeftRight ( const uint8_t* image, int8_t xCrd, int8_t yCrd, uint8_t width, uint8_t height ); + oled_status_t RightLeft ( const uint8_t* image, int8_t xCrd, int8_t yCrd, uint8_t width, uint8_t height ); + void SetBorders( int8_t xCrd, int8_t yCrd, uint8_t width, uint8_t height ); oled_status_t CreateTextBackground(); void WriteCharToBuf( uint16_t charToWrite, oled_pixel_t* chrBuf ); oled_status_t AddCharToTextArea( oled_pixel_t chrPtr, uint8_t chrWidth, uint8_t chrHeight, oled_pixel_t copyAddr, uint8_t imgWidth );