📄 osd.lst
字号:
521 1 BITEK_TxByte(OSD_MAD, VP_15D_OSD3_ATTR2, OSD3_CHAR_SIZE);
522 1
523 1 // [1]120 OSD3 Attribute 2
524 1 BITEK_TxByte(OSD_MAD, VP_15F_OSD3_ATTR4, OSD3_LINE_BLINK);
525 1
526 1 OSD_SetWindow(OSD_WINDOW3,
527 1 OSD_WINDOW3_H,
528 1 OSD_WINDOW3_V,
529 1 OSD_WINDOW3_WIDTH,
530 1 OSD_WINDOW3_HEIGHT );
531 1 } /* OSD_Init */
532
533
534 /* -------------------------------------------------------------------
535 Name: OSD_SetWindow - (OSD_BIT1611B)
536 Purpose: To setup OSD window position and size on the panel screen.
537 Passed:
538 UB8 bWindow = OSD Window Identifier.
539 UW16 wH_Pos = Horizontal position in clocks.
540 UW16 wV_Pos = Vertical position in horizontal lines.
541 UB8 bWidth = Horizontal size in characters.
542 UB8 bHeight = Vertical size in rows.
543 Returns: None
544 Notes: [1]115
545 ------------------------------------------------------------------- */
546 void OSD_SetWindow (
547 UB8 bWindow, // WINDOW 1, WINDOW 2 or WINDOW 3
548 UW16 wH_Pos, // Horizontal position in clocks (0..2047)
549 UW16 wV_Pos, // Vertical position in horizontal lines (0..511)
550 UB8 bWidth, // Horizontal size in characters (0..63)
C51 COMPILER V7.50 OSD 02/05/2007 16:33:25 PAGE 10
551 UB8 bHeight // Vertical size in rows (0..31)
552 )
553 {
554 1 switch (bWindow)
555 1 {
556 2 case OSD_WINDOW1:
557 2 // [1]115 Horizontal Position
558 2 BITEK_TxByte(OSD_MAD, VP_13813A_OSD1_H_POSITION, wH_Pos);
559 2
560 2 // [1]115 Vertical Position
561 2 BITEK_TxByte(OSD_MAD, VP_13913A_OSD1_V_POSITION, wV_Pos);
562 2
563 2 BITEK_TxByte(OSD_MAD,
564 2 VP_13A_OSD1_POSITION_MSB,
565 2 (wV_Pos >> 8) | ((wH_Pos >> 4) & 0x30)
566 2 );
567 2
568 2 // [1]115 Width
569 2 BITEK_TxByte(OSD_MAD, VP_13B_OSD1_WIDTH, bWidth - 1);
570 2
571 2 // [1]115 Height
572 2 BITEK_TxByte(OSD_MAD, VP_13C_OSD1_HEIGHT, bHeight - 1);
573 2 break;
574 2
575 2 case OSD_WINDOW2:
576 2 // [1]115 Horizontal Position
577 2 BITEK_TxByte(OSD_MAD, VP_146148_OSD2_H_POSITION, wH_Pos);
578 2
579 2 // [1]115 Vertical Position
580 2 BITEK_TxByte(OSD_MAD, VP_147148_OSD2_V_POSITION, wV_Pos);
581 2
582 2 BITEK_TxByte(OSD_MAD,
583 2 VP_148_OSD2_POSITION_MSB,
584 2 (wV_Pos >> 8) | ((wH_Pos >> 4) & 0x30)
585 2 );
586 2
587 2 // [1]115 Width
588 2 BITEK_TxByte(OSD_MAD, VP_149_OSD2_WIDTH, bWidth - 1);
589 2
590 2 // [1]115 Hieght
591 2 BITEK_TxByte(OSD_MAD, VP_14A_OSD2_HEIGHT, bHeight - 1);
592 2 break;
593 2
594 2 case OSD_WINDOW3:
595 2 // [1]115 Horizontal Position
596 2 BITEK_TxByte(OSD_MAD, VP_154156_OSD3_H_POSITION, wH_Pos);
597 2
598 2 // [1]115 Vertical Position
599 2 BITEK_TxByte(OSD_MAD, VP_155156_OSD3_V_POSITION, wV_Pos);
600 2
601 2 BITEK_TxByte(OSD_MAD,
602 2 VP_156_OSD3_POSITION_MSB,
603 2 (wV_Pos >> 8) | ((wH_Pos >> 4) & 0x30)
604 2 );
605 2
606 2 // [1]115 Width
607 2 BITEK_TxByte(OSD_MAD, VP_157_OSD3_WIDTH, bWidth - 1);
608 2
609 2 // [1]115 Hieght
610 2 BITEK_TxByte(OSD_MAD, VP_158_OSD3_HEIGHT, bHeight - 1);
611 2 break;
612 2 }
C51 COMPILER V7.50 OSD 02/05/2007 16:33:25 PAGE 11
613 1 } /* OSD_SetWindow */
614
615
616 /* -------------------------------------------------------------------
617 Name: OSD_ShowChar - (OSD_BIT1611B)
618 Purpose: To show a character at specified position in OSD window.
619 Passed:
620 UB8 bWindow = OSD Window Identifier.
621 UB8 bCol = Horizontal position in columns (0..OSD_WINDOW_WIDTH - 1).
622 UB8 bRow = Vertical position in rows (0..OSD_WINDOW_HEIGHT - 1).
623 UB8 bCharCode = The displayed character code.
624 Returns: None.
625 Notes:
626 ------------------------------------------------------------------- */
627 void OSD_ShowChar (
628 UB8 bWindow,
629 UB8 bCol, // 0..OSD_WINDOW_WIDTH - 1
630 UB8 bRow, // 0..OSD_WINDOW_HEIGHT - 1
631 UB8 bCharCode
632 )
633 {
634 1 UW16 wAddr;
635 1
636 1
637 1 wAddr = OSD_DisplayAddress(bWindow, bRow, bCol);
638 1 BITEK_TxByte(OSD_MAD, wAddr, bCharCode);
639 1 } /* OSD_ShowChar */
640
641
642 #if (OSD_SHOW_HEX)
/* -------------------------------------------------------------------
Name: OSD_ShowHex - (OSD_BIT1611B)
Purpose: To show one byte value in hexadecimal format at
specified position of OSD window.
Passed:
Returns: None.
Notes:
------------------------------------------------------------------- */
void OSD_ShowHex (
UB8 bWindow,
UB8 bCol,
UB8 bRow,
UB8 bValue
)
{
UB8 bChar;
bChar = bValue / 16;
if (bChar <= 9)
OSD_ShowChar(bWindow, bCol, bRow, '0' + bChar);
else
OSD_ShowChar(bWindow, bCol, bRow, 'A' + bChar - 10);
bChar = bValue % 16;
if (bChar <= 9)
OSD_ShowChar(bWindow, bCol+1, bRow, '0' + bChar);
else
OSD_ShowChar(bWindow, bCol+1, bRow, 'A' + bChar - 10);
} /* OSD_ShowHex */
#endif
674
C51 COMPILER V7.50 OSD 02/05/2007 16:33:25 PAGE 12
675
676 /* -------------------------------------------------------------------
677 Name: OSD_ShowMsg - (OSD_BIT1611B)
678 Purpose: To show a message string with zero at specified position in OSD window.
679 Passed:
680 UB8 bWindow = OSD Window Identifier.
681 UB8 bCol = Horizontal position in columns (0..OSD_WINDOW_WIDTH - 1).
682 UB8 bRow = Vertical position in rows (0..OSD_WINDOW_HEIGHT - 1).
683 UB8 abMsg[] = The displayed message string.
684 Returns: None.
685 Notes:
686 ------------------------------------------------------------------- */
687 void OSD_ShowMsg (
688 UB8 bWindow,
689 UB8 bCol,
690 UB8 bRow,
691 UB8 abMsg[]
692 )
693 {
694 1 UW16 wAddr;
695 1 UB8 bIdx;
696 1
697 1
698 1 wAddr = OSD_DisplayAddress(bWindow, bRow, bCol);
699 1
700 1 for (bIdx = 0; abMsg[ bIdx ]; bIdx++)
701 1 {
702 2 BITEK_TxByte(OSD_MAD, wAddr + bIdx, abMsg[ bIdx ]);
703 2 } /* for */
704 1 } /* OSD_ShowMsg */
705
706
707 #if (OSD_SHOW_VALUE)
708 /* -------------------------------------------------------------------
709 Name: OSD_ShowValue - (OSD_BIT1611B)
710 Purpose: To show a specified width value at specified position in OSD window.
711 Passed:
712 UB8 bWindow = OSD Window Identifier.
713 UB8 bCol, = Horizontal position in columns.
714 UB8 bRow, = Vertical position in rows.
715 UW16 wValue = The displayed value.
716 UB8 bWidth = The displayed width.
717 Returns: None.
718 Notes:
719 ------------------------------------------------------------------- */
720 void OSD_ShowValue (
721 UB8 bWindow,
722 UB8 bCol,
723 UB8 bRow,
724 UW16 wValue,
725 UB8 bWidth
726 )
727 {
728 1 UB8 bChar;
729 1 UB8 bIdx;
730 1
731 1
732 1 for (bIdx = bWidth; bIdx; bIdx--)
733 1 {
734 2 bChar = wValue % 10;
735 2 wValue /= 10;
736 2
C51 COMPILER V7.50 OSD 02/05/2007 16:33:25 PAGE 13
737 2 if ((wValue == 0) &&
738 2 (bChar == 0) )
739 2 {
740 3 if (bIdx == bWidth)
741 3 OSD_ShowChar(bWindow, bCol + bIdx - 1, bRow, '0');
742 3 else
743 3 OSD_ShowChar(bWindow, bCol + bIdx - 1, bRow, ' ');
744 3 }
745 2 else
746 2 OSD_ShowChar(bWindow, bCol + bIdx - 1, bRow, bChar + '0');
747 2 }
748 1
749 1 } /* OSD_ShowValue */
750 #endif
751
752
753
754 /* -------------------------------------------------------------------
755 Name: -
756 Purpose: .
757 Passed: None.
758 Returns: None.
759 Notes:
760 ------------------------------------------------------------------- */
761
762
763 /* **********************************************************************
764
765 Description:
766
767
768 ********************************************************************** */
769
770 /* %% End Of File %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% */
MODULE INFORMATION: STATIC OVERLAYABLE
CODE SIZE = 1427 ----
CONSTANT SIZE = 64 ----
XDATA SIZE = ---- ----
PDATA SIZE = ---- ----
DATA SIZE = ---- 62
IDATA SIZE = ---- ----
BIT SIZE = ---- 1
END OF MODULE INFORMATION.
C51 COMPILATION COMPLETE. 0 WARNING(S), 0 ERROR(S)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -