예제 #1
0
/*******************************************************************************
* Function Name  : LCD_PutPixel
* Description    : Outputs one pixel to the given screen coordinates.
* Input          : õ - x-coordinate
*                : y - y-coordinate
* Output         : None
* Return         : None
*******************************************************************************/
void LCD_PutPixel(uint32_t x, uint32_t y)
{
  uint32_t shifted, page;
  uint32_t data;

  if ((x>MAX_X)|(y>MAX_Y))
  {
    return;
  }

  SetCrystal((LCD_Crystal)(x/64));
  x %= 64;

  page = y/8;
  shifted = (1 << (y%8));
  LCD_SET_PAGE(page);
  LCD_SET_ADDRESS(x);
  data = ReadLCD_Data();
  switch (CurrentMethod)
  {
    case MET_OR :   data |= shifted;    break;
    case MET_XOR :  data ^= shifted;    break;
    case MET_AND :  data &= ~shifted;  	break;
  }
  LCD_SET_ADDRESS(x);
  WriteLCD_Data(data);
}
ECHARM_multiple_scattering::ECHARM_multiple_scattering(ECHARM_crystal *Crystal,ECHARM_particle *Particle)
{
    InitializePointersMultipleScattering();
    SetParticle(Particle);
    SetCrystal(Crystal);
    SetRadiationLength("tsai");
}