Skip to content

Commit 9874aa1

Browse files
committed
Small bit of clean-up for PDM Video
1 parent 08f67c0 commit 9874aa1

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

devices/video/pdmonboard.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.
3131
class HMC;
3232
class InterruptCtrl;
3333

34-
#define PDM_VMODE_OFF 0x1F
34+
constexpr auto PDM_VMODE_OFF = 0x1F;
3535

3636
/** Max. size of our framebuffer in bytes (RGB 13-inch, 16 bpp) */
37-
#define PDM_FB_SIZE_MAX (640 * 480 * 2)
37+
constexpr auto PDM_FB_SIZE_MAX = (640 * 480 * 2);
3838

3939
/** Fixed video modes supported by the PDM on-board video. */
4040
enum PdmVideoMode : uint8_t {
@@ -50,14 +50,14 @@ class PdmOnboardVideo : public VideoCtrlBase {
5050
PdmOnboardVideo();
5151
~PdmOnboardVideo() = default;
5252

53-
uint8_t get_video_mode() {
53+
uint8_t get_video_mode() const {
5454
return ((this->video_mode & 0x1F) | this->blanking);
5555
};
5656

5757
void set_video_mode(uint8_t new_mode);
5858
void set_pixel_depth(uint8_t depth);
5959
void set_vdac_config(uint8_t config);
60-
uint8_t get_vdac_config() {
60+
uint8_t get_vdac_config() const {
6161
return this->vdac_mode;
6262
};
6363
void set_clut_index(uint8_t index);

0 commit comments

Comments
 (0)