Skip to content

Commit 27a4422

Browse files
author
kolban
committed
Sat Jan 14 15:09:51 CST 2017
1 parent 77f5ae9 commit 27a4422

File tree

111 files changed

+28004
-415
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+28004
-415
lines changed

filesystems/espfs/components/espfs/espfs.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,11 @@ static void *espFlashPtr = NULL;
4949
EspFsInitResult espFsInit(void *flashAddress, size_t size) {
5050

5151
spi_flash_init();
52-
esp_err_t rc = spi_flash_mmap((uint32_t) flashAddress, 64*1024*2, SPI_FLASH_MMAP_DATA, (const void **)&espFlashPtr, &handle);
52+
if (size % (64*1024) != 0) {
53+
ESP_LOGE(tag, "Size is not divisible by 64K. Supplied was %d", size);
54+
return ESPFS_INIT_RESULT_NO_IMAGE;
55+
}
56+
esp_err_t rc = spi_flash_mmap((uint32_t) flashAddress, size, SPI_FLASH_MMAP_DATA, (const void **)&espFlashPtr, &handle);
5357
if (rc != ESP_OK) {
5458
ESP_LOGD(tag, "rc from spi_flash_mmap: %d", rc);
5559
}
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
* drawBitmap
2+
```
3+
drawBitmap(x, y, bitmap, w, h, color)
4+
```
5+
6+
* drawChar
7+
Characters are 5x8
8+
```
9+
drawChar(x, y, c, color, bg, size)
10+
```
11+
12+
* drawCircle
13+
```
14+
drawCircle(x, y, r, color)
15+
```
16+
17+
* drawLine
18+
```
19+
drawLine(x1, y1, x2, y2, color)
20+
```
21+
22+
* drawPixel
23+
```
24+
drawPixel(x,y,color)
25+
```
26+
27+
* drawRect
28+
```
29+
drawRect(x, y, w, h, color)
30+
```
31+
32+
* drawRoundRect
33+
```
34+
drawRoundRect(x, y, w, h, r, color)
35+
```
36+
37+
* fillCircle
38+
```
39+
fillCircle(x, y, r, color)
40+
```
41+
42+
* fillRect
43+
```
44+
fillRect(x, y, w, h, color)
45+
```
46+
47+
* fillRoundRect
48+
```
49+
fillRoundRect(x, y, w, h, r, color)
50+
```
51+
52+
* fillScreen
53+
```
54+
fillScreen(color)
55+
```
56+
57+
* setCursor
58+
```
59+
setCursor(x, y)
60+
```
61+
62+
* setRotation
63+
```
64+
setRotation(rotation)
65+
```
66+
67+
* setTextColor
68+
```
69+
setTextColor(color)
70+
setTextColor(color, backgroundColor)
71+
```
72+
73+
* setTextSize
74+
```
75+
setTextSize(size)
76+
```
77+
78+
* setTextWrap
79+
```
80+
setTextWrap(w)
81+
```

0 commit comments

Comments
 (0)