FreeRTOS/Demo/CORTEX_LM3S6965_GCC_QEMU/LocalDemoFiles/osram128x64x4.c
//*****************************************************************************
//
//! Initialize the OLED display.
//!
//! \param ulFrequency specifies the SSI Clock Frequency to be used.
//!
//! This function initializes the SSI interface to the OLED display and
//! configures the SSD0323 controller on the panel.
//!
//! This function is contained in <tt>osram128x64x4.c</tt>, with
//! <tt>osram128x64x4.h</tt> containing the API definition for use by
//! applications.
//!
//! \return None.
//
//*****************************************************************************
Initialize the OLED display.
\param ulFrequency specifies the SSI Clock Frequency to be used.

This function initializes the SSI interface to the OLED display and
configures the SSD0323 controller on the panel.

This function is contained in osram128x64x4.c, with
osram128x64x4.h containing the API definition for use by
applications.

\return None.
Initialize the OLED display . \ param ulFrequency specifies the SSI Clock Frequency to be used . This function initializes the SSI interface to the OLED display and configures the SSD0323 controller on the panel . This function is contained in osram128x64x4 . c with osram128x64x4 . h containing the API definition for use by applications . \ return None .
void
OSRAM128x64x4Init(unsigned long ulFrequency)
{
    unsigned long ulIdx;
     Enable the SSI0 and GPIO port  blocks as they are needed by this driver.
    SysCtlPeripheralEnable(SYSCTL_PERIPH_SSI0);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOA);
    SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
     Configure the SSI0CLK and SSIOTX pins for SSI operation.
    GPIOPinTypeSSI(GPIO_PORTA_BASE, GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5);
    GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_2, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD_WPU);
    GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_3, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD_WPU);
    GPIOPadConfigSet(GPIO_PORTA_BASE, GPIO_PIN_5, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD_WPU);
     Configure the PC7 pin as a D/Cn signal for OLED device.
    GPIODirModeSet(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_DIR_MODE_OUT);
    GPIOPadConfigSet(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_STRENGTH_8MA,
                     GPIO_PIN_TYPE_STD);
    GPIOPinWrite(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_PIN_7);
     Configure and enable the SSI0 port for master mode.
    OSRAM128x64x4Enable(ulFrequency);
     Clear the frame buffer.
    OSRAM128x64x4Clear();
     Initialize the SSD0323 controller.  Loop through the initialization
     sequence array, sending each command "string" to the controller.
    for(ulIdx = 0; ulIdx < sizeof(g_pucOSRAM128x64x4Init);
        ulIdx += g_pucOSRAM128x64x4Init[ulIdx] + 1)
    {
         Send this command.
        OSRAMWriteCommand(g_pucOSRAM128x64x4Init + ulIdx + 1,
                          g_pucOSRAM128x64x4Init[ulIdx] - 1);
    }
}
void OSRAM128x64x4Init ( unsigned long ulFrequency ) { unsigned long ulIdx ; SysCtlPeripheralEnable ( SYSCTL_PERIPH_SSI0 ) ; SysCtlPeripheralEnable ( SYSCTL_PERIPH_GPIOA ) ; SysCtlPeripheralEnable ( SYSCTL_PERIPH_GPIOC ) ; GPIOPinTypeSSI ( GPIO_PORTA_BASE , GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5 ) ; GPIOPadConfigSet ( GPIO_PORTA_BASE , GPIO_PIN_2 , GPIO_STRENGTH_8MA , GPIO_PIN_TYPE_STD_WPU ) ; GPIOPadConfigSet ( GPIO_PORTA_BASE , GPIO_PIN_3 , GPIO_STRENGTH_8MA , GPIO_PIN_TYPE_STD_WPU ) ; GPIOPadConfigSet ( GPIO_PORTA_BASE , GPIO_PIN_5 , GPIO_STRENGTH_8MA , GPIO_PIN_TYPE_STD_WPU ) ; GPIODirModeSet ( GPIO_PORTC_BASE , GPIO_PIN_7 , GPIO_DIR_MODE_OUT ) ; GPIOPadConfigSet ( GPIO_PORTC_BASE , GPIO_PIN_7 , GPIO_STRENGTH_8MA , GPIO_PIN_TYPE_STD ) ; GPIOPinWrite ( GPIO_PORTC_BASE , GPIO_PIN_7 , GPIO_PIN_7 ) ; OSRAM128x64x4Enable ( ulFrequency ) ; OSRAM128x64x4Clear ( ) ; for ( ulIdx = 0 ; ulIdx < sizeof ( g_pucOSRAM128x64x4Init ) ; ulIdx += g_pucOSRAM128x64x4Init [ ulIdx ] + 1 ) { OSRAMWriteCommand ( g_pucOSRAM128x64x4Init + ulIdx + 1 , g_pucOSRAM128x64x4Init [ ulIdx ] - 1 ) ; } }
Initialize the OLED display.
Initialize the OLED display .
// // Enable the SSI0 and GPIO port  blocks as they are needed by this driver. // // // Configure the SSI0CLK and SSIOTX pins for SSI operation. // // // Configure the PC7 pin as a D/Cn signal for OLED device. // // // Configure and enable the SSI0 port for master mode. // // // Clear the frame buffer. // // // Initialize the SSD0323 controller.  Loop through the initialization // sequence array, sending each command "string" to the controller. // // // Send this command. //