ssd1306 64x32 needs weird ResetCol

Đang mở
#842 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
53/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
go
Lĩnh vực
embedded-iot

Hướng nghiên cứu

Read ssd1306/ssd1306.go and trace how Device.Configure sets ResetCol from the display width. Compare the proposed 64-pixel behavior with the linked Adafruit implementation. Done means a 64x32 display gets the needed default column range while other configurations retain their expected behavior; add or update coverage for those cases.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

If you are writing code to interface with a 64x32 SSD1306, you need to pass in a weird ResetCol in the configuration:

	display := ssd1306.NewI2C(machine.I2C0)
	display.Configure(
		ssd1306.Config{
			Width:   64,
			Height:  32,
			ResetCol: ssd1306.ResetValue{0x20, 0x20+64-1},
			Address: 0x3C,
		},
	)

I suspect (but have not verified) that this could be made the default in ssd1306/ssd1306.go by checking for width=64 like the Adafruit library does:

@@ -77,6 +118,8 @@ func (d *Device) Configure(cfg Config) {
        }
        if cfg.ResetCol != zeroReset {
                d.resetCol = cfg.ResetCol
+       } else if d.width == 64 {
+               d.resetCol = ResetValue{0x20, uint8(0x20 + d.width - 1)}
        } else {
                d.resetCol = ResetValue{0, uint8(d.width - 1)}
        }
Ngôn ngữ chính
Go
Star
756
Fork
251
Merge trung bình
7 ngày 12 giờ
Pull request đã merge (30 ngày)
8

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của tinygo-org/drivers

Tất cả issue của tinygo-org/drivers

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.