Solar panel
|
#include <stdint.h>
#include <stdbool.h>
Go to the source code of this file.
Functions | |
void | TMR0_Initialize (void) |
void | TMR0_StartTimer (void) |
void | TMR0_StopTimer (void) |
uint16_t | TMR0_ReadTimer (void) |
void | TMR0_WriteTimer (uint16_t timerVal) |
void | TMR0_Reload (void) |
void | TMR0_ISR (void) |
void | TMR0_SetInterruptHandler (void(*InterruptHandler)(void)) |
void | TMR0_DefaultInterruptHandler (void) |
Variables | |
void(* | TMR0_InterruptHandler )(void) |
void TMR0_DefaultInterruptHandler | ( | void | ) |
void TMR0_Initialize | ( | void | ) |
TMR0 Generated Driver API Header File
@Company Microchip Technology Inc.
@File Name tmr0.h
@Summary This is the generated header file for the TMR0 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs
@Description This header file provides APIs for TMR0. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 Device : PIC18F97J60 Driver Version : 2.01 The generated drivers are tested against the following: Compiler : XC8 2.36 and above MPLAB : MPLAB X 6.00 Section: Included Files Section: TMR0 APIs @Summary Initializes the TMR0.
@Description This function initializes the TMR0 Registers. This function must be called before any other TMR0 function is called.
@Preconditions None
@Param None
@Returns None
@Comment
@Example main() { Initialize TMR0 module TMR0_Initialize();
Do something else... }
Section: TMR0 APIs
void TMR0_ISR | ( | void | ) |
uint16_t TMR0_ReadTimer | ( | void | ) |
@Summary Reads the 16 bits TMR0 register value.
@Description This function reads the 16 bits TMR0 register value and return it.
@Preconditions Initialize the TMR0 before calling this function.
@Param None
@Returns This function returns the 16 bits value of TMR0 register.
@Example Initialize TMR0 module
Start TMR0 TMR0_StartTimer();
Read the current value of TMR0 if(0 == TMR0_ReadTimer()) { Do something else...
Reload the TMR value TMR0_Reload(); }
void TMR0_Reload | ( | void | ) |
@Summary Reload the 16 bits value to TMR0 register.
@Description This function reloads the 16 bit value to TMR0 register. This function must be called to write initial value into TMR0 register.
@Preconditions Initialize the TMR0 before calling this function.
@Param None
@Returns None
@Example while(1) { if(TMR0IF) { Do something else...
clear the TMR0 interrupt flag TMR0IF = 0;
Reload the initial value of TMR0 TMR0_Reload(); } }
void TMR0_SetInterruptHandler | ( | void(*)(void) | InterruptHandler | ) |
void TMR0_StartTimer | ( | void | ) |
@Summary This function starts the TMR0.
@Description This function starts the TMR0 operation. This function must be called after the initialization of TMR0.
@Preconditions Initialize the TMR0 before calling this function.
@Param None
@Returns None
@Example Initialize TMR0 module
Start TMR0 TMR0_StartTimer();
Do something else...
void TMR0_StopTimer | ( | void | ) |
@Summary This function stops the TMR0.
@Description This function stops the TMR0 operation. This function must be called after the start of TMR0.
@Preconditions Initialize the TMR0 before calling this function.
@Param None
@Returns None
@Example Initialize TMR0 module
Start TMR0 TMR0_StartTimer();
Do something else...
Stop TMR0; TMR0_StopTimer();
void TMR0_WriteTimer | ( | uint16_t | timerVal | ) |
@Summary Writes the 16 bits value to TMR0 register.
@Description This function writes the 16 bits value to TMR0 register. This function must be called after the initialization of TMR0.
@Preconditions Initialize the TMR0 before calling this function.
@Param timerVal - Value to write into TMR0 register.
@Returns None
@Example #define PERIOD 0x8000 #define ZERO 0x0000
while(1) { Read the TMR0 register if(ZERO == TMR0_ReadTimer()) { Do something else...
Write the TMR0 register TMR0_WriteTimer(PERIOD); }
Do something else... }
|
extern |
@Summary Timer Interrupt Handler
@Description This is a function pointer to the function that will be called during the ISR
@Preconditions Initialize the TMR0 module with interrupt before calling this isr.
@Param None
@Returns None
TMR0 Generated Driver File
@Company Microchip Technology Inc.
@File Name tmr0.c
@Summary This is the generated driver implementation file for the TMR0 driver using PIC10 / PIC12 / PIC16 / PIC18 MCUs
@Description This source file provides APIs for TMR0. Generation Information : Product Revision : PIC10 / PIC12 / PIC16 / PIC18 MCUs - 1.81.8 Device : PIC18F97J60 Driver Version : 2.01 The generated drivers are tested against the following: Compiler : XC8 2.36 and above MPLAB : MPLAB X 6.00 Section: Included Files Section: Global Variables Definitions