FreeTRX/MDUV380_firmware/application/include/io/display.h
Marcus Kida 89c0b8fa60 Layout: add 4px padding below the S-meter before the top info strip
Shift the contact/TG, CTCSS/DCS and squelch info lines down by a tunable
DISPLAY_MAIN_CONTENT_TOP_PAD (4px) on MD-UV380/DM1701, so they no longer sit
flush against the new S-meter label row. Frequency and everything below are
unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-06 12:56:33 +02:00

52 lines
2.6 KiB
C

/*
* Copyright (C) 2019 Kai Ludwig, DG4KLU
* Copyright (C) 2019-2025 Roger Clark, VK3KYY / G4KYF
* Daniel Caujolle-Bert, F1RMB
*
*
* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
* in the documentation and/or other materials provided with the distribution.
*
* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
*
* 4. Use of this source code or binary releases for commercial purposes is strictly forbidden. This includes, without limitation,
* incorporation in a commercial product or incorporation into a product or project which allows commercial use.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
* USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
#ifndef _OPENGD77_DISPLAY_H_
#define _OPENGD77_DISPLAY_H_
#include <stdbool.h>
#define BACKLIGHT_MIN_USABLE_VALUE 1
#define DIPLAYLCD_TYPE_RGB (1 << 7)
#define DISPLAYLCD_GET_TYPE(x) (x & ~DIPLAYLCD_TYPE_RGB)
#define DISPLAYLCD_TYPE_IS_RGB(x) (x & DIPLAYLCD_TYPE_RGB)
extern uint8_t displayLCD_Type;
void displayInit(bool isInverted, bool SPIFlashAvailable);
void displaySetInvertedState(bool isInverted);
void displayEnableBacklight(bool enable, int displayBacklightPercentageOff);
int displayGetIdleBacklightPercentage(void);
bool displayIsBacklightLit(void);
void displayWriteCmd(uint8_t cmd);
void displayWriteData(uint8_t val);
void displayWriteCmds(uint8_t cmd, size_t len, uint8_t opts[]);
#endif /* _OPENGD77_DISPLAY_H_ */