ps2sdk  1.1
A collection of Open Source libraries used for developing applications on Sony's PlayStation 2® (PS2).
sync.c File Reference
#include <errno.h>
#include <stdio.h>
#include <kernel.h>
#include <libgs.h>
#include "internal.h"
+ Include dependency graph for sync.c:

Go to the source code of this file.

Functions

void GsDrawSync (int mode)
 
void GsHSync (int mode)
 
void GsVSync (int mode)
 

Function Documentation

◆ GsDrawSync()

void GsDrawSync ( int  mode)

Definition at line 18 of file sync.c.

19 {
20  switch(mode)
21  {
22  case 0:
23  default:
24  GsDmaWait();
25  }
26 }
void GsDmaWait(void)
Definition: dma.c:148
s32 mode
Definition: rpc_client.c:15

References GsDmaWait(), and mode.

Referenced by main().

◆ GsHSync()

void GsHSync ( int  mode)

Definition at line 28 of file sync.c.

29 {
30  unsigned short i;
31 
32  switch(mode)
33  {
34  case 0:
37  break;
38  default:
39  if(mode>1)
40  {
41  for(i=0;i<mode;i++)
42  {
45  }
46  }
47  }
48 }
#define GS_GET_CSR_hsync_intrupt
Definition: libgs.h:1326
#define GS_SET_CSR_hsync_intrupt(val)
Definition: libgs.h:1294

References GS_GET_CSR_hsync_intrupt, GS_SET_CSR_hsync_intrupt, and mode.

◆ GsVSync()

void GsVSync ( int  mode)

Definition at line 50 of file sync.c.

51 {
52  unsigned short i;
53 
54  switch(mode)
55  {
56  case 0: //just wait
59  break;
60  default: // wait for num of vsync to pass
61  if(mode>1)
62  {
63 
64  for(i=0;i<mode;i++)
65  {
68 
69  }
70  }
71  }
72 }
#define GS_GET_CSR_vsync_intrupt
Definition: libgs.h:1329
#define GS_SET_CSR_vsync_intrupt(val)
Definition: libgs.h:1297

References GS_GET_CSR_vsync_intrupt, GS_SET_CSR_vsync_intrupt, and mode.

Referenced by main().