Main Page   Modules   Data Structures   File List   Data Fields   Globals   Related Pages  

Parallel port controls

Functions


Function Documentation

void Clear_PortFInterrupt (   ) 
 

Remove interrupt handler on port F.

See also:
Set_PortFInterruptService, Set_PortGInterruptService, Set_PortFInterruptEnable, Set_PortGInterruptEnable, Clear_PortGInterrupt

void Clear_PortGInterrupt (   ) 
 

Remove interrupt handler on port G.

See also:
Set_PortFInterruptService, Set_PortGInterruptService, Set_PortFInterruptEnable, Set_PortGInterruptEnable, Clear_PortFInterrupt

void Set_Port (  void   ) 
 

Apply all port settings that BFTC GUI as required.
In HARDWARE tab of BFTC widget are present several tables for port configurations.
Function, direction, LABEL name etc., all these settings are included in config.c and config.h files This procedure execute built code. This procedure must be executed as first at code beginning.

void Set_PortFInterruptEnable (  int  bit,
bool  ena
) 
 

Enable/Disable the interrupt on the rising edge of specified bits on port F.

Parameters:
bit List of used bit as OR or SUM. Example: PF1 | PF2 | PF3 or PF1 + PF2 + PF3
ena Enable (true) / Disable (false) interrupt.
See also:
Set_PortFInterruptService, Set_PortGInterruptService, Set_PortGInterruptEnable, Clear_PortFInterrupt, Clear_PortGInterrupt

void Set_PortFInterruptService (  int  bit,
void(*  pCallback)()
) 
 

Enable the interrupt on the rising edge of specified bits on port F. With this procedure is possible to create an interrupt service on the rising edge of a specifed bit.

Parameters:
bit List of used bit as OR or SUM. Example: PF1 | PF2 | PF3 or PF1 + PF2 + PF3
pCallback Pointer to a procedure to be exec on interrupt.
See also:
Set_PortFInterruptEnable, Set_PortGInterruptService, Set_PortGInterruptEnable, Clear_PortFInterrupt, Clear_PortGInterrupt
        // Simple program that show how to set an interrupt on PFx rising edge
        //
        #include "main.h"

        unsigned counter = 0;

        // Interrupt service procedure
        //
        void PortCallback()
        {
                counter++;
                printf("PF0 rising edge count = %06d\n", counter);
                // Clear the interrupt request
                PPF_CLR = PF0;
        }

        int main(void)
        {
                Set_PLL(16, 4);         // CORE: 25MHz * 16 = 400MHz, SCLK: 400MHz / 4 = 100MHz
                Set_Port();                     // Set the port according to project set
                Set_Uart0(115200);      // printf is redirected to UART0
                
                // Set an interrupt on the rising edge of the PF0 port
                Set_PortFInterruptService(PF0, PortCallback);
                Set_PortFInterruptEnable(PF0, true);
                while(1)                        // Main loop
                {
                }
                return 0;
        }

void Set_PortGInterruptEnable (  int  bit,
bool  ena
) 
 

Enable/Disable the interrupt on the rising edge of specified bits on port G.

Parameters:
bit List of used bit as OR or SUM. Example: PG1 | PG2 | PG3 or PG1 + PG2 + PG3
ena Enable (true) / Disable (false) interrupt.
See also:
Set_PortFInterruptService, Set_PortGInterruptService, Set_PortFInterruptEnable, Clear_PortFInterrupt, Clear_PortGInterrupt

void Set_PortGInterruptService (  int  bit,
void(*  pCallback)()
) 
 

Enable the interrupt on the rising edge of specified bits on port G. With this procedure is possible to create an interrupt service on the rising edge of a specifed bit.

Parameters:
bit List of used bit as OR or SUM. Example: PG1 | PG2 | PG3 or PG1 + PG2 + PG3
pCallback Pointer to a procedure to be exec on interrupt.
See also:
Set_PortFInterruptEnable, Set_PortFInterruptService, Set_PortGInterruptEnable, Clear_PortFInterrupt, Clear_PortGInterrupt
        // Simple program that show how to set an interrupt on PGx rising edge
        //
        #include "main.h"

        unsigned counter = 0;

        // Interrupt service procedure
        //
        void PortCallback()
        {
                counter++;
                printf("PG0 rising edge count = %06d\n", counter);
                // Clear the interrupt request
                PPG_CLR = PG0;
        }

        int main(void)
        {
                Set_PLL(16, 4);         // CORE: 25MHz * 16 = 400MHz, SCLK: 400MHz / 4 = 100MHz
                Set_Port();                     // Set the port according to project set
                Set_Uart0(115200);      // printf is redirected to UART0
                
                // Set an interrupt on the rising edge of the PG0 port
                Set_PortGInterruptService(PG0, PortCallback);
                Set_PortGInterruptEnable(PG0, true);
                while(1)                        // Main loop
                {
                }
                return 0;
        }


Generated on Tue Apr 7 20:07:44 2015 for BF592A Library by doxygen 1.3.1