Skip to content

Commit 17552f6

Browse files
committed
[drv] Add SSD1331 device driver
1 parent b1378c1 commit 17552f6

File tree

8 files changed

+639
-20
lines changed

8 files changed

+639
-20
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=RT-Thread
2-
version=0.7.4
2+
version=0.7.5
33
author=onelife <[email protected]>, Bernard Xiong <[email protected]>
44
maintainer=onelife <[email protected]>
55
sentence=Real Time Operating System porting for Arduino SAM and SAMD boards

src/components/arduino/drv_iic_ft6206.cpp

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ static rt_err_t ft_read_data(struct bsp_ft_contex *ctx) {
157157
static rt_err_t bsp_ft6206_init(rt_device_t dev) {
158158
struct bsp_ft_contex *ctx = (struct bsp_ft_contex *)(dev->user_data);
159159
rt_err_t ret;
160-
(void)dev;
161160

162161
/* open lower level device */
163162
ret = rt_device_open(ctx->ldev, RT_DEVICE_OFLAG_RDWR);
@@ -212,11 +211,6 @@ static rt_size_t bsp_ft6206_read(rt_device_t dev, rt_off_t pos, void *buf,
212211
(void)size;
213212

214213
do {
215-
if (RT_DEVICE_OFLAG_WRONLY == (ctx->dev.open_flag & 0x0003)) {
216-
err = -RT_EINVAL;
217-
break;
218-
}
219-
220214
err = rt_device_open(ctx->ldev, RT_DEVICE_OFLAG_RDWR);
221215
if (RT_EOK != err) break;
222216

@@ -266,7 +260,7 @@ static rt_err_t bsp_ft6206_control(rt_device_t dev, rt_int32_t cmd, void *args)
266260
*
267261
* @param[in] struct bsp_ft_contex *ctx - Pointer to FT6206 contex
268262
*
269-
* @param[in] const char *name - Pointer to FT6206 name
263+
* @param[in] const char *name - Pointer to FT6206 device name
270264
*
271265
* @param[in] void *ldev - Pointer to lower level device
272266
*
@@ -330,7 +324,7 @@ rt_err_t bsp_hw_ft6206_init(void) {
330324
} while (0);
331325

332326
if (RT_EOK != ret) {
333-
LOG_E("[FT] h/w init failed: %d", ret);
327+
LOG_E("[FT E] h/w init failed: %d", ret);
334328
}
335329

336330
return ret;

src/components/arduino/drv_spi.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,11 @@
1212

1313
/* Exported defines ----------------------------------------------------------*/
1414
#define SPI_DEFAULT_SPEED (250000)
15-
#define SPI_MAX_SPEED (24000000)
15+
#ifdef ARDUINO_ARCH_SAM
16+
# define SPI_MAX_SPEED (24000000)
17+
#else
18+
# define SPI_MAX_SPEED (12000000)
19+
#endif
1620
#define SPI_DEFAULT_RETRY (10)
1721
#define SPI_DEFAULT_LIMIT (512)
1822
#define SPI_FLAG_MORE (rt_uint32_t)(0x01 << 16)

0 commit comments

Comments
 (0)