osd 2.0.0.0
|
Functions | |
void | osd_cfg_setup (osd_cfg_t *cfg) |
Config Object Initialization function. | |
err_t | osd_init (osd_t *ctx, osd_cfg_t *cfg) |
Initialization function. | |
void | osd_default_cfg (osd_t *ctx) |
Click Default Configuration function. | |
void | osd_write_byte (osd_t *ctx, uint8_t reg_address, uint8_t write_data) |
Write the byte of data. | |
uint8_t | osd_read_byte (osd_t *ctx, uint8_t reg_address) |
Read the byte of data function. | |
void | osd_hw_reset (osd_t *ctx) |
Hardware reset function. | |
void | osd_enable (osd_t *ctx) |
Enable OSD function. | |
void | osd_disable (osd_t *ctx) |
Disable OSD function. | |
void | osd_write_character (osd_t *ctx, uint8_t line_pos, uint8_t row_pos, uint8_t symbol) |
Write character by position function. | |
void | osd_insert_custom_char (osd_t *ctx, uint8_t chr_address, uint8_t custom_char) |
Write custom character function. | |
void | osd_clears_char_places (osd_t *ctx, uint8_t start_x, uint8_t start_y, uint8_t end_x, uint8_t end_y) |
Clears the character places function. | |
void | osd_set_ntsc (osd_t *ctx) |
Set NTSC video standard function. | |
void | osd_set_pal (osd_t *ctx) |
Set PAL video standard function. | |
void | osd_set_video_sync_mode (osd_t *ctx, uint8_t sync_mode) |
Set video sync mode function. | |
void | osd_enable_display_image (osd_t *ctx) |
Enable display of OSD image function. | |
void | osd_disable_display_image (osd_t *ctx) |
Disable display of OSD image function. | |
void | osd_vertical_sync_screen (osd_t *ctx, uint8_t vsync) |
Enable vertical synchronization of on-screen data function. | |
void | osd_soft_reset (osd_t *ctx) |
Software reset function. | |
void | osd_enable_video_buffer (osd_t *ctx) |
Enable video buffer. | |
void | osd_disable_video_buffer (osd_t *ctx) |
Disable video buffer. | |
void | osd_set_background_mode (osd_t *ctx, uint8_t b_mode) |
Set background mode. | |
void | osd_set_background_brightness (osd_t *ctx, uint8_t brightness) |
Set background brightness function. | |
void | osd_set_blinking_time (osd_t *ctx, uint8_t blinking_time) |
Set blinking time. | |
void | osd_set_blinking_duty_cycle (osd_t *ctx, uint8_t blink_duty_cycle) |
Set blinking duty cycle function. | |
void | osd_set_horizontal_offset (osd_t *ctx, uint8_t h_offset) |
Set horizontal offset function. | |
void | osd_set_vertical_offset (osd_t *ctx, uint8_t v_offset) |
Set vertical offset function. | |
void | osd_set_operation_mode (osd_t *ctx, uint8_t op_mode) |
Set operation mode function. | |
void | osd_set_local_background_control (osd_t *ctx, uint8_t lb_mode) |
Set local background control function. | |
void | osd_blinking_on (osd_t *ctx) |
Set blinking ON function. | |
void | osd_blinking_off (osd_t *ctx) |
Set blinking OFF function. | |
void | osd_invert_pixels_display (osd_t *ctx) |
Invert color of pixels on display function. | |
void | osd_normal_pixels_display (osd_t *ctx) |
Normal color of pixels on display function. | |
void | osd_clear_display_memory (osd_t *ctx) |
Clear display memory. | |
void | osd_write_chars (osd_t *ctx, uint8_t *symbol_buff, osd_write_chars_t *write_ctx) |
Write character function. | |
void | osd_write_nvm_character (osd_t *ctx, uint8_t v_chars, uint16_t v_index) |
Write NVM character function. | |
void | osd_set_character_color_white (osd_t *ctx) |
Set the white background of the character function. | |
void | osd_set_character_color_black (osd_t *ctx) |
Set the black background of the character function. | |
void | osd_character_blinking_on (osd_t *ctx) |
Set blinking ON function. | |
void | osd_character_blinking_off (osd_t *ctx) |
Set blinking OFF function. | |
void | osd_invert_pixels_character (osd_t *ctx) |
Invert color of character pixels on display. | |
void | osd_normal_pixels_character (osd_t *ctx) |
Normal color of character pixels on display. | |
void | osd_set_sharpness (osd_t *ctx, uint8_t s_data) |
Set sharpness function. | |
void | osd_enable_auto_black (osd_t *ctx) |
Enable automatic OSD black function. | |
void | osd_disable_auto_black (osd_t *ctx) |
Disable automatic OSD black function. | |
uint8_t | osd_get_status (osd_t *ctx) |
Get status data function. | |
uint8_t | osd_get_display_data_out (osd_t *ctx) |
Get display memory data out function. | |
uint8_t | osd_get_character_data_out (osd_t *ctx) |
Get character memory data out function. | |
uint8_t | osd_get_los (osd_t *ctx) |
Get loss of sync status function. | |
uint8_t | osd_get_vsync (osd_t *ctx) |
Get vertical sync status function. | |
uint8_t | osd_get_hsync (osd_t *ctx) |
Get horizontal sync status function. | |
void osd_blinking_off | ( | osd_t * | ctx | ) |
Set blinking OFF function.
ctx | Click object |
This function sets blinking OFF by clear to '0' [ bit 4 ] states to the targeted OSD_DMM_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_blinking_on | ( | osd_t * | ctx | ) |
Set blinking ON function.
ctx | Click object |
This function set blinking ON by set to '1' [ bit 4 ] states to the targeted OSD_DMM_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_cfg_setup | ( | osd_cfg_t * | cfg | ) |
Config Object Initialization function.
cfg | Click configuration structure. |
This function initializes click configuration structure to init state.
void osd_character_blinking_off | ( | osd_t * | ctx | ) |
Set blinking OFF function.
ctx | Click object. |
This function sets blinking OFF.
void osd_character_blinking_on | ( | osd_t * | ctx | ) |
Set blinking ON function.
ctx | Click object. |
This function sets blinking ON by set to '1' [ bit 6 ] states to the targeted OSD_DMDI_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_clear_display_memory | ( | osd_t * | ctx | ) |
Clear display memory.
ctx | Click object |
This function clears display memory.
This bit is automatically cleared after the operation is completed. This operation is automatically performed: - 1) On power-up; - 2) Immediately following the rising edge of RESET; - 3) Immediately following the rising edge of CS; Delay is 1 ms.
void osd_clears_char_places | ( | osd_t * | ctx, |
uint8_t | start_x, | ||
uint8_t | start_y, | ||
uint8_t | end_x, | ||
uint8_t | end_y ) |
Clears the character places function.
ctx | Click object. |
start_line_pos | initial line position value |
start_row_pos | initial row position value |
end_line_pos | last line position value |
end_row_pos | last row position value |
The function clears the character by position to the targeted register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_default_cfg | ( | osd_t * | ctx | ) |
Click Default Configuration function.
ctx | Click object. |
This function executes default configuration for OSD click.
void osd_disable | ( | osd_t * | ctx | ) |
Disable OSD function.
ctx | Click object. |
This function disables OSD by clear to '0' [ bit 3 ] states to the targeted OSD_VM0_REG register address.
void osd_disable_auto_black | ( | osd_t * | ctx | ) |
Disable automatic OSD black function.
ctx | Click object. |
This function disables automatic OSD black by set to '1' [ bit 4 ] states to the targeted OSD_OSDBL_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_disable_display_image | ( | osd_t * | ctx | ) |
Disable display of OSD image function.
ctx | Click object. |
This function disables display of OSD image by clear to '0' [ bit 3 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_disable_video_buffer | ( | osd_t * | ctx | ) |
Disable video buffer.
ctx | Click object. |
This function disables video buffer by set to '1' [ bit 0 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_enable | ( | osd_t * | ctx | ) |
Enable OSD function.
ctx | Click object. |
This function enables OSD by set to '1' [ bit 3 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_enable_auto_black | ( | osd_t * | ctx | ) |
Enable automatic OSD black function.
ctx | Click object. |
This function enables automatic OSD black.
void osd_enable_display_image | ( | osd_t * | ctx | ) |
Enable display of OSD image function.
ctx | Click object. |
This function enables display of OSD image by set to '1' [ bit 3 ] states to the targeted _OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_enable_video_buffer | ( | osd_t * | ctx | ) |
Enable video buffer.
ctx | Click object. |
This function enables video buffer by clear to '0' [ bit 0 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
uint8_t osd_get_character_data_out | ( | osd_t * | ctx | ) |
Get character memory data out function.
ctx | Click object. |
This function gets character memory data out by read from the targeted OSD_CMDO_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
Status data: - [ bit 7:6 ] : Leftmost pixel. 00 = Black, 10 = White, 01 or 11 = Transparent; - [ bit 5:4 ] : Left center pixel. 00 = Black, 10 = White, 01 or 11 = Transparent; - [ bit 3:2 ] : Right center pixel. 00 = Black, 10 = White, 01 or 11 = Transparent: - [ bit 1:0 ] : Rightmost pixel. 00 = Black, 10 = White, 01 or 11 = Transparent;
uint8_t osd_get_display_data_out | ( | osd_t * | ctx | ) |
Get display memory data out function.
ctx | Click object. |
This function gets display memory data out by read from the targeted OSD_DMDO_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
status data: - [ bit 7 ] : Local Background Control: - 0 : Sets the background pixels of the character to the video input (VIN) when in external sync mode; - 1 : Sets the background pixels of the character to the background mode brightness level defined ( external or internal sync mode ); - [ bit 6 ] : Blink: - 0 : Blinking off; - 1 : Blinking on; - [ bit 5 ] : Invert: - 0 : Normal ( white pixels display white, black pixels display black ); - 1 : Invert ( white pixels display black, black pixels display white ); - [ bit 4:0 ] : Don't Care;
uint8_t osd_get_hsync | ( | osd_t * | ctx | ) |
Get horizontal sync status function.
ctx | Click object. |
This function gets horizontal sync status by return status of PWM pin of OSD Click board.
HSYNC state values: - 0 : not active - 1 : active
uint8_t osd_get_los | ( | osd_t * | ctx | ) |
Get loss of sync status function.
ctx | Click object. |
This function gets loss of sync status by return status of AN pin of OSD Click board.
LOS state values: - 0 : not active - 1 : active
uint8_t osd_get_status | ( | osd_t * | ctx | ) |
Get status data function.
ctx | Click object. |
This function gets status data by read from the targeted OSD_STAT_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
Status data: - [ bit 7 ] : Don't Care; - [ bit 6 ] : Reset Mode: - 0 : Clear when power-up reset mode is complete; - 1 : Set when in power-up reset mode; - [ bit 5 ] : Character Memory Status: - 0 : Available to be written to or read from; - 1 : Unavailable to be written to or read from; - [ bit 4 ] : VSYNC Output Level: - 0 : Active during vertical sync time; - 1 : Inactive otherwise; - [ bit 3 ] : HSYNC Output Level: - 0 : Active during horizontal sync time; - 1 : Inactive otherwise; - [ bit 2 ] : Loss-of-Sync ( LOS ): - 0 : Sync Active. Asserted after 32 consecutive input video lines; - 1 : No Sync. Asserted after 32 consecutive missing input video lines; - [ bit 1 ] : NTSC: - 0 : NTSC signal is not detected at VIN; - 1 : NTSC signal is detected at VIN; - [ bit 0 ] : PAL: - 0 : PAL signal is not detected at VIN; - 1 : PAL signal is detected at VIN;
uint8_t osd_get_vsync | ( | osd_t * | ctx | ) |
Get vertical sync status function.
ctx | Click object. |
This function gets vertical sync status by return status of INT pin of OSD Click board.
VSYNC state values: - 0 : not active - 1 : active
void osd_hw_reset | ( | osd_t * | ctx | ) |
Hardware reset function.
ctx | Click object. |
This function Hardware reset - resets the MAX7456 single-channel monochrome OSD with integrated EEPROM memor by cleared to '0' RST state pin, wait for 10 ms, set to '1' RST state pin and wait for another 10 ms.
Delay is 20 ms.
Initialization function.
osd | Click object. |
cfg | Click configuration structure. |
This function initializes all necessary pins and peripherals used for this click.
void osd_insert_custom_char | ( | osd_t * | ctx, |
uint8_t | chr_address, | ||
uint8_t | custom_char ) |
Write custom character function.
ctx | Click object. |
chr_address | 8-bit character register address |
custom_char | 8-bit value of character |
This function writes custom character by position to the targeted register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_invert_pixels_character | ( | osd_t * | ctx | ) |
Invert color of character pixels on display.
ctx | Click object. |
This function sets invert color of character pixels on display.
void osd_invert_pixels_display | ( | osd_t * | ctx | ) |
Invert color of pixels on display function.
ctx | Click object |
This function inverts color of pixels on display.
void osd_normal_pixels_character | ( | osd_t * | ctx | ) |
Normal color of character pixels on display.
ctx | Click object. |
This function sets normal color of character pixels on display.
void osd_normal_pixels_display | ( | osd_t * | ctx | ) |
Normal color of pixels on display function.
ctx | Click object |
This function normal color of pixels on display.
uint8_t osd_read_byte | ( | osd_t * | ctx, |
uint8_t | reg_address ) |
Read the byte of data function.
ctx | Click object. |
reg_address | 8-bit register address |
This function rides 8-bit of data from the targeted 8-bit register address.
void osd_set_background_brightness | ( | osd_t * | ctx, |
uint8_t | brightness ) |
Set background brightness function.
ctx | Click object. |
brightness |
This function sets background brightness.
Background Mode Brightness: - 0 : 0%; - 1 : 7%; - 2 : 14%; - 3 : 21%; - 4 : 28%; - 5 : 35%; - 6 : 42%; - 7 : 49%;
void osd_set_background_mode | ( | osd_t * | ctx, |
uint8_t | b_mode ) |
Set background mode.
ctx | Click object. |
b_mode |
This function sets background mode.
In internal sync mode, the background mode bit is set to '1'. b_mode values: - 0 : Sets the state of each character background; - 1 : Sets all displayed background pixels to gray;
void osd_set_blinking_duty_cycle | ( | osd_t * | ctx, |
uint8_t | blink_duty_cycle ) |
Set blinking duty cycle function.
ctx | Click object. |
blink_duty_cycle |
This function sets blinking duty cycle by write blink_duty_cycle value to the targeted OSD_VM1_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
Blinking Duty Cycle ( On : Off ): - 0 : Blinking Time : Blinking Time; - 1 : Blinking Time : ( 2 x Blinking Time ); - 2 : Blinking Time : ( 3 x Blinking Time ); - 3 : ( 3 x Blinking Time ) : Blinking Time;
void osd_set_blinking_time | ( | osd_t * | ctx, |
uint8_t | blinking_time ) |
Set blinking time.
ctx | Click object. |
blinking_time | Blinking time to be set |
This function sets blinking time of the click.
Blinking Time: - 0 : 2 fields ( 33 ms in NTSC mode, 40 ms in PAL mode ); - 1 : 4 fields ( 67 ms in NTSC mode, 80 ms in PAL mode ); - 2 : 6 fields ( 100 ms in NTSC mode, 120 ms in PAL mode ); - 3 : 8 fields ( 133 ms in NTSC mode, 160 ms in PAL mode );
void osd_set_character_color_black | ( | osd_t * | ctx | ) |
Set the black background of the character function.
ctx | Click object. |
This function sets the black background of the character
void osd_set_character_color_white | ( | osd_t * | ctx | ) |
Set the white background of the character function.
ctx | Click object. |
This function sets the white background of the character
void osd_set_horizontal_offset | ( | osd_t * | ctx, |
uint8_t | h_offset ) |
Set horizontal offset function.
ctx | Click object. |
h_offset | Horisontal possition offset |
This function sets horizontal offset.
Horizontal Position Offset: - 0 : Farthest left ( -32 pixels ); - . - . - . - 32 : No horizontal offset; - . - . - . - 63 : Farthest right ( +31 pixels );
void osd_set_local_background_control | ( | osd_t * | ctx, |
uint8_t | lb_mode ) |
Set local background control function.
ctx | Click object |
lb_mode | Local background control to be set |
This function sets local background control.
Local Background Control: - 0 : Sets the background pixels of the character to the video input (VIN) when in external sync mode; - 1 : Sets the background pixels of the character to the background mode brightness level defined status ( external or internal sync mode );
void osd_set_ntsc | ( | osd_t * | ctx | ) |
Set NTSC video standard function.
ctx | Click object. |
This function sets NTSC video standard by clear to '0' [ bit 6 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_set_operation_mode | ( | osd_t * | ctx, |
uint8_t | op_mode ) |
Set operation mode function.
ctx | Click object. |
op_mode | Operation mode to be set. |
This function sets operation mode.
Operation Mode Selection: - 0 : 16-bit operation mode; - The 16-bit operation mode increases the speed at which the display memory can be updated; - 1 : 8-bit operation mode: - The 8-bit operation mode provides maximum flexibility when writing characters to the display memory;
void osd_set_pal | ( | osd_t * | ctx | ) |
Set PAL video standard function.
ctx | Click object. |
This function sets PAL video standard by set to '1' [ bit 6 ] states to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_set_sharpness | ( | osd_t * | ctx, |
uint8_t | s_data ) |
Set sharpness function.
ctx | Click object. |
s_data | Data to be written to OSD_OSDM_REG register |
This function sets sharpness by write s_data value to the targeted OSD_OSDM_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
OSD Rise and Fall Time : OSD Insertion Mux Switching Time - 0 : 20 ns and 30 ns; - 1 : 30 ns and 35 ns; - 2 : 35 ns and 50 ns; - 3 : 60 ns and 75 ns; - 4 : 80 ns and 100 ns; - 5 : 110 ns and 120 ns;
void osd_set_vertical_offset | ( | osd_t * | ctx, |
uint8_t | v_offset ) |
Set vertical offset function.
ctx | Click object. |
v_offset | Vertical possition offset |
This function sets horizontal offset
Vertical Position Offset: - 0 : Farthest up ( +16 pixels ); - . - . - . - 16 : No vertical offset; - . - . - . - 31 : Farthest down ( -15 pixels );
void osd_set_video_sync_mode | ( | osd_t * | ctx, |
uint8_t | sync_mode ) |
Set video sync mode function.
ctx | Click object. |
sync_mode | Sync Mode to be set. |
This function sets the video sync mode: autosync, external or internal by write sync_mode value to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
sync mode values: - 0 : Autosync select (external sync when LOS = 0 and internal sync when LOS = 1); - 1 : External; - 2 : Internal;
void osd_soft_reset | ( | osd_t * | ctx | ) |
Software reset function.
ctx | Click object. |
This function performs software reset OSD click by set to '1' [ bit 1 ] states to the to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory.
This bit is automatically cleared to '0' by hardware. Delay is 1 ms.
void osd_vertical_sync_screen | ( | osd_t * | ctx, |
uint8_t | vsync ) |
Enable vertical synchronization of on-screen data function.
ctx | Click object. |
vsync | vsync options |
This function enables vertical synchronization of on-screen data by write vsync value to the targeted OSD_VM0_REG register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
vsync values: - 0 : Enable on-screen display immediately; - 1 : Enable on-screen display at the next VSYNC;
void osd_write_byte | ( | osd_t * | ctx, |
uint8_t | reg_address, | ||
uint8_t | write_data ) |
Write the byte of data.
ctx | Click object. |
reg_address | 8-bit register address |
write_data | Byte of data to write |
This function writes the byte of data to the targeted 8-bit register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_write_character | ( | osd_t * | ctx, |
uint8_t | line_pos, | ||
uint8_t | row_pos, | ||
uint8_t | symbol ) |
Write character by position function.
ctx | Click object. |
line_pos | 8-bit value of line position |
row_pos | 8-bit value of row position |
symbol | 8-bit value of character |
This function writes character by position to the targeted register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
void osd_write_chars | ( | osd_t * | ctx, |
uint8_t * | symbol_buff, | ||
osd_write_chars_t * | write_ctx ) |
Write character function.
ctx | Click object |
symbol_buff | Pointer to the memory location of symbolBuff |
write_ctx | Write context structure for this function |
This function writes array of character by position to the targeted register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.
write_ctx->flags values: 1 : blink; 2 : invert;
void osd_write_nvm_character | ( | osd_t * | ctx, |
uint8_t | v_chars, | ||
uint16_t | v_index ) |
Write NVM character function.
ctx | Click object |
v_chars | 8-bit character value |
v_index | 8-bit index value |
This function writes NVM character to the targeted register address of MAX7456 single-channel monochrome OSD with integrated EEPROM memory on OSD click board.