Skip to content

Commit eafef7f

Browse files
author
dave
committed
First published version
1 parent 69d1931 commit eafef7f

File tree

6 files changed

+16
-11
lines changed

6 files changed

+16
-11
lines changed

Adafruit_SSD1306.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ All text above, and the splash screen must be included in any redistribution
2626
#include "mbed.h"
2727
#include "Adafruit_GFX.h"
2828

29+
#ifndef PROGMEM
30+
#define PROGMEM
31+
#endif // PROGMEM
32+
2933
#define SSD1306_EXTERNALVCC 0x1
3034
#define SSD1306_SWITCHCAPVCC 0x2
3135

examples/mbedClock/NTPTimeEvent.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
//
2-
// Created by David Cherry on 25/06/2020.
3-
//
41

52
#include <IoLogging.h>
63
#include "NTPTimeEvent.h"

examples/mbedClock/NTPTimeEvent.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
2-
31
#ifndef TCMENUEXAMPLE_NTPTIMEEVENT_H
42
#define TCMENUEXAMPLE_NTPTIMEEVENT_H
53

examples/mbedClock/analogClock.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/**
22
* A more complex example that acquires time from the network using NTP and displays it on the screen
3-
* The NTP class is apache licensed, and can be used directly in your code
3+
* The NTP class is licensed under the same license as the code, and can be used directly in your code
4+
* even for commercial designs.
45
*
56
* MBED 6 RTOS example.
67
*/

examples/mbedHello/mbedHello.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44

55
#include <cstdio>
66
#include "mbed.h"
7+
#include <PlatformDetermination.h>
78
#include <TaskManager.h>
89
//#include "Adafruit_SSD1306_I2c.h" (for i2c displays)
910
#include "Adafruit_SSD1306_Spi.h"
11+
#include <Fonts/FreeSans9pt7b.h>
1012

1113
bool running = true;
1214

@@ -23,7 +25,8 @@ int main()
2325
gfx.begin();
2426

2527
gfx.clearDisplay();
26-
gfx.setCursor(0, 0);
28+
gfx.setFont(&FreeSans9pt7b);
29+
gfx.setCursor(0, 16);
2730
gfx.setTextColor(WHITE);
2831
gfx.print("Hello mbed");
2932

@@ -32,7 +35,8 @@ int main()
3235
gfx.display();
3336

3437
taskManager.scheduleFixedRate(1, [] {
35-
gfx.fillRect(0, 20, gfx.width(), 20);
38+
gfx.fillRect(0, 20, gfx.width(), 20, BLACK);
39+
gfx.setFont(nullptr);
3640
gfx.setCursor(0, 20);
3741
gfx.print(millis());
3842

library.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
"maintainer": false
1818
}
1919
],
20-
"description": "A derived version of the BSD licensed Adafruit GFX library for mbed 6 RTOS boards. It can render to SSD1306 and SH1106 controllers using SPI or I2C.",
20+
"description": "A derived version of the BSD licensed Adafruit GFX library for mbed 6 RTOS boards. It can render to SSD1306 and SH1106 controllers using SPI or I2C. It currently requires IoAbstraction and TaskManagerIO to operate.",
21+
"license": "BSD-Source-Code",
2122
"frameworks": "mbed",
2223
"keywords": [
2324
"display",
@@ -37,7 +38,7 @@
3738
],
3839
"repository": {
3940
"type": "git",
40-
"url": ""
41+
"url": "https://github.com/davetcc/Adafruit-GFX-mbed-fork"
4142
},
42-
"version": "0.0.1"
43+
"version": "0.1.0"
4344
}

0 commit comments

Comments
 (0)