home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 2686
Discussions: 186,606, Posts: 2,227,046, Members: 230,241
Free Scan: Update Your PC's Outdated Drivers to Optimize Performance
Old July 11th, 2008, 11:31 AM   Digg it!   #1 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 3
NEED HELP IN C

I have two files

Library/src/xxx_tim.c
--------------------------
u16 TIM_GetCounter(TIM_TypeDef* TIMx)
{
/* Check the parameters */
assert_param(IS_TIM_ALL_PERIPH(TIMx));

/* Get the Counter Register value */
return TIMx->CNT;
}


clock.c
---------
clock_time(void)
{
TIM_GetCounter(TIM2)

return -----
}

I want to return the to the TIM_GetCounter but i don't know how to return back to the first file where it specifies it please help

krisrimat is offline   Reply With Quote
TechIMO.com Ads - Login or register for less ads.
How many errors does your computer have?

You no longer need to guess! This free stability scan and registry cleaner download will give you a complete diagnosis of your Windows registry, identifying errors and conflicts.

FREE instant scan


Guest, Register Free! to remove this ad and get your tech support questions answered in minutes!
Old July 11th, 2008, 12:03 PM     #2 (permalink)
Member
 
Join Date: Jul 2008
Posts: 30
Blog Entries: 1
Send a message via AIM to theGlitch
are these just snippets of code? they're small enough functions that you could just include them in the same file.

theGlitch is online now   Reply With Quote
Old July 11th, 2008, 12:39 PM     #3 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 3
They are part of the very long code.I am trying to return a value which i am not sure of how to return.And if u know anu online tutorial or if u can help me...that would be really appreciated.

krisrimat is offline   Reply With Quote
Old July 11th, 2008, 02:38 PM     #4 (permalink)
Member
 
Join Date: Jul 2008
Posts: 30
Blog Entries: 1
Send a message via AIM to theGlitch
Ok, well if I understand what you're trying to do... you're talking about inheritance. Inheritance is used in object oriented programming (which C is not). I think I've found an article that may help you: on emmbedded.com if this doesn't help you, look into programming in C++ which is an object oriented language that is very close to C.

If I was wrong about the inheritance, look into structures in C. That may also be what you're striving for.

Last edited by theGlitch : July 11th, 2008 at 02:41 PM.
theGlitch is online now   Reply With Quote
Old July 11th, 2008, 02:49 PM     #5 (permalink)
Junior Member
 
Join Date: Jul 2008
Posts: 3
Thx buddy,i got the soln........if any one want to explian for getting knowledge i surely can...just reply i will share the knowledge and soln
krisrimat is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may post new threads
You may post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Most Active Discussions
Is It Just Me? (528)
Misery Loves Company... (1849)
Why Does the MOON Grow Bigger as It.. (18)
heatsink issue (10)
New Mobo (18)
UPGRADING C/D DRIVE TO 250GB & .. (14)
SSD's, RAID, and External Backup (7)
1 internet. 1 house. 3 computer. ho.. (13)
Is This A Compatible Gaming PC? (18)
Recent Discussions
firewall (1)
C++ compiler suggestions (4)
Official World of Warcraft Thre.. (4529)
Programming question (2)
UPGRADING C/D DRIVE TO 250GB &a.. (14)
Ubuntu or Xubuntu....anyone!!? (7)
Building my first PC and need s.. (0)
PNY vs Gainward (3)
Linksys WRT54G (2)
FS: Dell 6000 laptop, modded 36.. (2)
Apple iPod touch 16 GB $200 (4)
Six 28-Disc Cross Design Black .. (4)


All times are GMT -4. The time now is 11:53 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28