Project

General

Profile

Revision 156

added files

View differences:

proj/proj_func.c
1
#include "proj_func.h"
2
#include "interrupts_func.h"
3
#include "graphics.h"
4
#include "errors.h"
5

  
6
#include <lcom/lcf.h>
7

  
8
int cleanup(void) {
9
    int r = SUCCESS;
10
    if ((r = unsubscribe_all()))
11
        printf("%s: failed to unsubscribe drivers.\n", __func__);
12

  
13
    if ((r = vg_exit()))
14
        printf("%s: vg_exit failed to exit to text mode.\n", __func__);
15
    if ((r = free_memory_map()))
16
        printf("%s: lm_free failed\n", __func__);
17

  
18
    return r;
19
}
0 20

  
proj/proj_func.h
1
#ifndef PROJ_FUNC_H_INCLUDED
2
#define PROJ_FUNC_H_INCLUDED
3

  
4
/**
5
 * @brief Cleans up all memory, unsubscribes interrupts.
6
 * @return ERROR_CODE code representing the result of the operation, SUCCESS code is returned if everything is OK
7
 * @see {_ERRORS_H_::errors}
8
 */
9
int cleanup(void);
10

  
11
#endif /* end of include guard: PROJ_FUNC_H_INCLUDED */
0 12

  

Also available in: Unified diff