CRT Controller settings
#include <mode.h>
typedef struct disp_crtc_settings {
    short       xres;
    short       yres;
    short       refresh;
    unsigned    pixel_clock;
    uint8_t     sync_polarity;
    uint8_t     h_granularity;
    uint8_t     v_granularity;
    short       h_total;
    short       h_blank_start;
    short       h_blank_len;
    short       h_sync_start;
    short       h_sync_len;
    short       v_total;
    short       v_blank_start;
    short       v_blank_len;
    short       v_sync_start;
    short       v_sync_len;
    unsigned    flags;
} disp_crtc_settings_t;
The disp_crtc_settings_t structure contains the CRT Controller
(CRTC) settings.
  | 
These members are used in conjunction with generic modes only (with the
refresh member applicable to both generic and fixed modes):
- h_granularity
 
- v_granularity
 
- pixel_clock
 
- sync_polarity
 
- h_total
 
- h_blank_start
 
- h_blank_len
 
- h_sync_start
 
- h_sync_len
 
- v_total
 
- v_blank_start
 
- v_blank_len
 
- v_sync_start
 
- v_sync_len
 
 
For more information, see the
get_modelist()
function in the description of disp_modefuncs_t.  | 
 
The members include:
- xres, yres
 
- The horizontal and vertical resolution, in pixels.
 
- refresh
 
- The refresh rate (in Hz)
 
- pixel_clock
 
- The pixel clock rate (in kHz)
 
- sync_polarity
 
- Any combination of the following bits:
  
- DISP_SYNC_POLARITY_V_POS — vertical synchronization
    is indicated by a positive signal if this bit is on, else negative.
    
  
 
- DISP_SYNC_POLARITY_H_POS — horizontal
    synchronization is indicated by a positive signal if this bit is on,
    else negative.
    
  
 
    Or, you can use the following manifest constants (composed of the bits from
  the above):
  
- DISP_SYNC_POLARITY_NN — both synchronization
    signals are negative.
    
  
 
- DISP_SYNC_POLARITY_NP — horizontal negative,
    vertical positive.
    
  
 
- DISP_SYNC_POLARITY_PN — horizontal positive,
    vertical negative.
    
  
 
- DISP_SYNC_POLARITY_PP — both synchronization
    signals are positive.
    
  
 
 
- h_granularity, v_granularity
 
- The horizontal and vertical granularity; the values of the other
  h_* and v_* members must be
  multiples of these.
 
- h_total, h_blank_start, h_blank_len,
  h_sync_start, h_sync_len
 
- Detailed monitor timings indicating the horizontal total, blanking start,
  length of blanking, horizontal sync start and length, given in units of
  h_granularity.
 
- v_total, v_blank_start, v_blank_len,
  v_sync_start, v_sync_len
 
- Detailed monitor timings indicating the vertical total, blanking start,
  length of blanking, horizontal sync start and length; given in units of
  lines.
 
- flags
 
- There are currently no flags defined.
 
Photon
disp_modefuncs_t